At the moment I have spys on my world from a planet mine or their ships can not reach.
Spys are physical and should only go as far as ships can take them.
An exception I guess is they are moved to another planet while in some sort of cryogenic suspension. And another could be the diplomatic communications make some of my citizens sympathetic to them and spy for them.