Where emailed links to websites open in Safari when using Spaces
I use a MacBook Pro (M2 series) in Sonoma 14.6.1. I have a number of spaces set up to organize my activities, 4 or 5 of which have open Safari windows with pertinent web pages left open in tabs. I read Mail in Space 1. I also have a Safari window open in that space so that clicking on emailed links doesn't take me off to another space but instead opens a tab in the Space 1 window. That approach seemed to work for a while, but recently, when I click on a link in Mail, I hurtle off to a Safari window in another Space (Space 4 as it happens). The window that links are currently opened in is not the latest window I've read or opened. It's a window that stays open all the time but gets refreshed frequently to show latest results. I've used various strategies to coax Mail (or Safari) to resume opening links in the Space 1 Safari window, but have yet to be successful.
Is there a way to get links to open where I want them to (apart from copy-paste)? I gather Safari (or is it Mail) uses some algorithm to decide where to open emailed links but that it can't be modified by users. I've never seen any discussion of how its behavior might be affected by the use of Spaces.
So, my questions: A) Does anyone know what the algorithm is? and/or B) Is there any procedure that might produce the results I want?