A Mac may jump to another desktop because the application already has open windows there or because the app is assigned to that desktop. Check those two rules before treating the movement as random.
Check application switching behavior
In Desktop & Dock settings under Mission Control, macOS offers When switching to an application, switch to a Space with open windows for the application. When enabled, selecting an app can take you to a desktop where one of its windows already exists.
Turn the option off only if you prefer the current desktop to remain in place when switching apps. Then test with a disposable app window on another Space.
Check Dock assignment
Control-click the app’s Dock icon, open Options, and inspect Assign To. “This Desktop,” “All Desktops,” a display-specific desktop, and “None” produce different placement behavior. Use app assignment only when all or most windows from that app belong to the same context.
If one browser or editor serves several projects, assigning the entire app to one Space may be too broad. Move individual windows instead or use another identity layer.
Separate opening from finding
Opening a new document can still interact with an app’s existing windows and its own behavior. Record which action caused the jump: launching the app, selecting it with Command-Tab, opening a file, or creating a window. Change one setting and reproduce the same action.
This evidence distinguishes a predictable macOS rule from an application-specific window decision.