The Russo Brothers have decided to explain what happened to Loki in Avengers: Endgame.
For now, the Russo Brothers are out explaining every decision they made for Avengers: Endgame, along with screenwriters Christopher Markus and Stephen McFeely.
Loki shows up in Avengers: Endgame when Tony Stark, Scott Lang, and Steve Rogers head back to the Battle of New York to fetch the Tesseract.
However, the Loki from Infinity War is supposedly dead as the Russos promised at the time of its release.