Hey, i actually seem to have the same bug gotta try to provide a video
You're so right thanks for the video, the randomness of the dungeons really makes it difficult to keep track of every posibility. I'll try my best to prevent this from ever happening. You can use Esc/Triangle/Y to escape back to the entrance, unfortunately you will loose the stuff you collected. if you quit and restart, you saved file will have what you did when you entered the church.
Hope this helps,