To get outside the maze, move the cursor against the top-right of the maze. You'll pass through the wall and be able to walk outside, or even go left and finish the level.