Im struggling to think of one place which this would apply to. Anywhere you die should be accessible by just running, if there's something blocking you way, you 1) shouldn't be there 2) experienced a bug.
Take for instance these doors, they are opened once a person hits revered (afaik) so if you die in there, you can simply go back without the door in the way anyway. With this in mind, just make doors solid objects while in spirit form.