How to properly recreate the movement on yoshi island from mario world

How do I…

I want to recreate for example “yoshi Island” from the old mario world games. In paticulair the part where mario moves from Level to level after completing one.
For exmaple the seconds 50 to 55. That is what I want to create.

This is the reference video:
Title: Super Mario World - Complete Walkthrough
From: Typhlosion4President
Site: youtube
(I may not post links)

What is the expected result

My own character walking between each level When using 1 of the arrow keys.

What is the actual result

IT goes correct for the first 2 options. Going Right to space 2, then Left to Space 3. But when I do Up. It teleport directly to the starting position.

Related screenshots

Code screenshot:

Project files (optional)

At 3 The character teleports back to starting location.

Project files (optional)

At 3 The character teleports back to starting location.

Additional code part:
The bottom part:

Image of what I want to create: