to exit the dungeon you gotta get to the stairs at the last room of the floor then go to the door after that and itll give you the option to go further or leave