Avengers: Infinity War - 14 Things You Probably Didn't Notice
3. Doctor Strange Confirms He Didn't Die Properly
There was a hint back in Doctor Strange's solo movie that suggests that Doctor Strange has already confirmed that the ending will be undone for certain. In that movie, when The Ancient One is dying, she says to Strange "I spent so many years peering through time... looking at this exact moment. But I can't see past it." She basically confirms that nobody can see past their own death, no matter what their powers as it's a subjective experience.
If that is true, then there can be no way that Doctor Strange would be able to see any victory over Thanos that had been assisted by his own death. And since Strange confirms that this future is the one that will lead to his defeat (when he says "there was no other way" and refers to the "endgame", we know that the heroes' victory required Strange's (and everyone else's) sacrifice.
But at the same time, we know it cannot last because Strange definitively has to be alive to witness the victory to be sure of it. So that means the snap is 100% going to be undone - it's just the specifics we need to consider now.