Thanks for reporting this issue.
It never happened to me, but others mentioned it in the other comments too.
Instead of teleporting them back, I will try to prevent them escape the screen in the first place.
Preventing them from escaping in the first place is good, but it's better to make sure escape is 100% impossible by teleporting them back if it does happen. Especially given that this game doesn't seem to save or have any other way of getting them back once they escape.