Here’s a similar type of problem and solution.
Another is to have a sprite (well 4 instances of it) stretched around the outside of your scene (as in outside of the viewable area), and if your sprite collides with any of them then you now it’s off the screen.