Sucks, right?

This is something that has persisted since the last patch. I think it might just be better to not allow long rest while inside such areas since the player is going to have to exit anyway to get the long rest.

Perhaps the character could say something like "it's not safe to sleep here" to indicate that you can't long rest.

Technically, this is normal for the gameplay so far. You need to leave that area; go outside.