No, you are never actually locked inside a room. The way you enter the room is always available for you to exit through. This allows players who have to step out of the game the ability to do so. It also ensures that all of our guests are safe in any situation and can get out.
However, you do not “escape” the game if you leave the way you come in. Every game has another way out. The fun comes from finding the clues and figuring out the story and puzzles of the room with your friends.