There is a bug when you have active window open for given project and making actions on second window triggers action on first window instead of first one. I have attached short video.
From the recording, the action that jumped windows was the “View File History (Commits)” button. That button comes from a Git history extension, not from Cursor itself. Its commit list is a sidebar view, and sidebar views always open in the main window because a moved-out editor window has no sidebar of its own. Where the extension opens its history tab is up to the extension too.
To narrow down whether this goes beyond that extension, could you try this?
Restart Cursor and open your project.
Open any file, right-click its tab and choose “Move into New Window”.
Click inside the editor in the new window.
Press Cmd+P, type the name of a different file and press Enter.
Still in the new window, right-click a function or variable name and choose “Go to Definition”.
Do the files from steps 4 and 5 open in the new window or the original one?
Also, which extension provides that “View File History (Commits)” button (you can see it in the Extensions view), and does the same thing happen with that extension in VS Code?