There are two main ways to set up this sort of game, and the answer kind of depends on which method you use.
a. Is the entire level created ahead of time and you're actively scrolling and moving through it? There are a few ways you can keep the UI in place, including the viewport expressions, anchor behavior, and layer parallax. Using the same idea of holding your UI in place, you can also place invisible helper sprites that define the edges of your screen. Those would be solid to prevent your character from moving through them, or maybe push out solids using custom movement with the character having the solid behavior.
b. Does the character and viewport actually stay still and the objects/stage generated off the edge of the viewport and move past the character? See the space shooter template for this type of setup, I'd recommend this if you're trying to emulate Balloon Trip.