Its left deliberately vague but I did not get the sense that it was either all in his head or that he was stuck in the 1940s, but rather that it was a supernatural phenomenon where each person's fate depended on their personality and character.
The closest to a definitive answer that I could find is from an interview with the film-makers:
We purposely left the ending open for interpretation because this
movie is about the journey- where our characters end up at the end of
YellowBrickRoad is dependent on their fears and motivations. Every
character ends up with a different fate because of who they are.