I think this is a strong start that has a few fixes you could make -- some easy, some less so.
For starters, there needs to be some kind of way for the player to figure out if something is a hallucination or not. Trial-and-error is a tricky thing to get right, and me traveling through 5 rooms just to get killed by something I couldn't have foreseen is frustrating. Hallucinations are fine, but give the player some kind of clue that the hazard is about to kill them.
The undo function is neat, but I think it should be mapped to a button. Switching between both hands on the keyboard to one hand on the mouse, especially when I'll die if I don't click it fast enough, is a bit frustrating.
You have the basic building blocks of a solid game idea here, and I would keep iterating on it and improving it. You have something here with the "undo" mechanic, but play around with it and see if you can find ways to make it more compelling. Just make sure that player isn't punished too much for getting killed by something they had no chance of avoiding.
Nice job!