Thanks for sharing the bug and that you like the game mechanic. Were there more shadows when the bug occurs, or just one?
If more shadows, then they spawn fine when you die.
Just the one. So I had just walked into a room, but the shadow took its time following. So I went back into the corridor to see how far behind it was. Then I got hit and I respawned in the corridor, while the shadow was in the new room. The door in-between I had previously unlocked was locked again. So the shadow could not follow because of locked door, and I couldn't go down to get the key, because I would get to far away from the shadow and die.