But that branch directly created what we saw in Endgame.
Sure, but our characters left the branch, so they wouldn't be affected. This isn't confirmed, just how I would explain it.
- Avengers travel back to 2012.
- Time and Mind Stones are grabbed, but the Space Stone gets stolen by Loki.
- Avengers decide to jump back one more time to get the old Space Stone.
- Loki, having escaped, is captured by the TVA.
- Steve Rogers pops back to 2012 with the Time and Mind Stones, returns them, hops back to return another one.
- The TVA, satisfied that it's served its purpose for the Sacred Timeline, prunes the branch.
You could honestly go even further out, and say that Loki grabbing the Tesseract was a branch on top of a branch; they were supposed to fail to get the Space Stone, but they weren't supposed to let Loki get it.