Loki can remain in the Endgame section because of his 2012 and 2013 alternates. Loki escaped in an alternate reality of 2012 with the Tesseract. But remember what Bruce Banner said to War Machine and Hawkeye during the movie, "Time doesnt work that way. If you travel to the past, that past becomes your future, and your former present becomes the past, which can't now be changed by your new future." He tells them that they would technically only create alternate realities of the past where they're something different. Captain America changed so he didn't go into the ice where he would be sleeping for almost 70 years just to wake up in 2011.