It is better for your experience to stay in the game until you escape, although, in an emergency, you can always leave the game.