According to the Blu-ray 'Maker's Audio Commentary' (featuring the two directors; Joe and Anthony Russo and the two writers; Christopher Markus and Stephen McFeely), Thanos is inside the Soul Stone.
That being said, the directors also also offer the possibility that this might just be a "fevered dream" caused by the power of the Infinity Stones and the damage to Thanos' psyche.
Joe Russo: So Thanos is transported, through the power that was
needed, or required to wipe out half the life of the universe into
this dream state inside the Soul Stone.
Christopher Markus: And he is allowed one last meeting with that which he gave up to get there.
Joe Russo: The spiritual representation of his daughter.
Anthony Russo: It's a fever dream.
Joe Russo: Yeah. Is it a fever dream? Is it a part of storytelling, is it plot? Does she exist inside that stone? Is this in his mind?
Christopher Markus: The freedom you have when you've made 18 movies prior to this.
Stephen McFeely: It's just so valuable for him as a character, though. In the next couple of minutes, he goes through some sort of palpable
regret and then by the time he gets to the porch, I think he's...
Christopher Markus: 'Cause when your villain wins, I don't want evil cackling. I want to know the cost.
Joe Russo: See there, with his gauntlet and the arm, the power that it takes to use all six stones is significant, and clearly damaged the
gauntlet and damaged Thanos permanently.