It's all going to come down to what plans they have for the character moving forward. If they want to use him in future films, they can save him / bring him back any number of ways. As others have mentioned, they are planning a Loki TV series, but there's no knowing when it takes place, or how much Hiddleston's version of Loki will be in it. It could be about Kid Loki, or She-Loki, and Hiddleston may only narrate, or appear in a cameo.
We know that Loki appears in Endgame - there's a couple of photos. But all signs point to this being a Loki from the past, most likely from the events of the first Avengers movie.
So there's a possibility that Loki could gain (and retain) knowledge about the events leading up to his death, and could make plans to survive.
It's also possible that when they undo the Snap with the Gauntlet (the basic version of the most likely end of the film), they might roll back further than the moment of the Snap itself. They may be able to save all the people on the Asgardian ship, including Loki.
And it's also possible that Loki never died in the first place in Infinity War, but just faked his death, as he has so many times before.