In story telling, having a the whole story revealed to be a dream or hallucination in the end is lazy writing/ bad story telling.
Spoiler
I think one big example that come to mind is Mr.Robot.
It's like the writers took all the questions that they layed in the person mind and just throw it in the garbage and replace it with new blank canvas to write a new story.