It also seems that you can throw it over the left or right wall when you get it above the top wall.
Alternatively you could just return them back inside the game rectangle when you see that their coords are somewhere outside...
Or improve the collision detection / collision mechanics...
EDIT: You also seem to scale the game considering only the width, when it is decreased then user can see higher. Suggestion would be to check the height as well and make sure that all users see the same area.