I'm not really sure. There's a lot of unknowns.You're mixing certain numbers up. $500m was Endgame's approximate profit from its box office run, it will be much more in total.
Supposedly between actors taking a cut, China and the $500 million production and P&A budget, Endgame's profit for the studio was closer to $500m.
Which is about where Joker is now in terms of profit due to low P&A and production budget.
Although who knows how the numbers actually turn out. I would imagine only Disney and WB know their numbers and they probably wouldn't want to share it.
Infinity War's total profit was $500m, and that was based off $900m box office returns for the studio. Endgame's returns are $300m higher, and the movies were made together, with the cost for each essentially being equal, about half of a big total. So if you assume costs were the same as for IW, then Endgame is heading for $800m+ profit.
Now, perhaps there is a bigger budget on Endgame for various reasons, but I think that's counterracted by the fact that Endgame is setting home entertainment records, and TV deals will be super favourable for the new biggest film ever. Endgame's profit should be at the very least $700m.