Ok, buckle up because I had this idea right before I took a nap, but it basically fixes everything about Endgame.
I'll put it behind a cut in case any of you haven't seen it yet.
I've been thinking about the theory that creating a change in the timeline creates it's own pocket universe. That's why they had to be careful about putting the stones back.
However, the moment that Thanos from the past is killed, the events that take place in Endgame become stripped from the main timeline and end up in their own pocket universe. That means the original, which I will call Prime, universe continues on without Thanos ever invading Earth or forcing the Infinity War.
That means in the Prime Universe Tony Stark is still alive. I need to get the dates right, to see if this makes everything after Black Panther not-canon to the Prime Universe....
The proof of this? When Nebula shoots her past self, her present self doesn't wink out of existence. They are already diverged enough from the Prime Timeline that she continues to exist, because she killed the Nebula of the Prime universe.
I have no idea what this means for Cap yet. If he created yet another pocket universe, or if he realized when he went to put the stones back that he was already in a diverged timeline, so decided to fuck it all and go for Peggy.
If I write fanfic in this world I'll tag it AvengersPrime. Please feel free to use this theory as you see fit;)