I also had issues clicking on the sides of the screen sometimes, and after replaying it, I suspect the issue is that some objects are inconsistently "in front of" some of the side-of-screen hitboxes, so that the game registers the click as being on a piece of the ground (which doesn't do anything when clicked) rather than the side of the screen.