Windows move to Spaces when opened

How can I avoid that windows are being opened in a new Space on MacOS? I assume this problem has something to do with the fact that I am developing the app on 2 different monitors and that when I move a Window, that positions is being saved to the Preferences table in my Database? I already set the left positions off all the windows in the database to 150, so that should be within the limit of a single monitor, but still they are opening in a new Space. This is a problem when running the app on a computer that only uses 1 monitor.