Even though it looks like your level has limits, the game world is infinitely large. The visible level size is only a guide. To prevent the player from falling outside your level, block them off with tiles or solid objects.
You could also code limits into the player script. For example, constantly check if the player travels further than 2000 pixels, and if they have, restart the level: