Your link leads me to the project folder - but there is no capx file there (only a backup).
I'm going to suggest though without looking at it, that you can bound the player to viewport (at any size or shape) by using the method I mentioned above. I have done this for my camera object on a layout that is unbounded scrolling.
[If player.X is less than viewportleft("layer") + (player.width/2)]
--- Player.X set X to viewportleft("layer") + (player.width/2)
Do this for each side of the viewport (top, bottom, right) and your character player won't be able to leave the view, but enemies are free to move around the entire layout still.
~Sol