I’m sorry I don’t remember much. I haven’t touched this code for many years. I looked at the code and there is nothing about moving Visor window between spaces. Visor is placed on the current Finder’s space.
Have you seen this thread?
It suggests that macOS behaviour is that when you switch to an empty space it makes Finder active app on that space. That could explain that unexpected behaviour. Because that would effectively move Finder to that space for next Visor activation.