@Sinak Hi I replied to a similar question here: Importing and moving a transparent gif
Basically you have to create at least 2 separate files. One for the main scene with the character, and one with the moving background. In the latter you have to use the camera layer to create a motion of the background and then import it on the main scene where your character is walking in a cycle in the same place. This will give the illusion of the character moving over the background.
You can also make the opposite animating the character with a camera against a transparent background and importing that into the main scene with a static background.
Another way is to use another software like Synfig to move interactively the character that was animated in Pencil2D.