On a Mac, you can change the “primary” display. At some point in the past it controlled where menubar would appear. Totally undiscoverable, of course (you have to drag a tiny white rectangle that looks like a decoration).
You can still do it, and here’s a really weird thing about that: when you drag menubar from one display to another, it moves all the windows. Why? I suspect, programmers link windows to some numerical display id, and selecting primary display changes those ids. Maybe, when you are inside the computer, it all makes sense somehow.
And here’s the morale: try to think about this interaction in a physical space. This is why I recorded video on my phone, not just the content of the screens. If you are looking at it as a user, there’s no reason for any of the windows to move at all! User didn’t ask for it, monitors are exactly the same, nothing really changed! So why is computer playing shuffle? To be honest, it shouldn’t even blink in that case.
Same with plugging another monitor: it shouldn’t be a big deal! New monitor means I just got more space, okay. But please do not touch my _existing_ windows! I will start using the new monitor at my own pace.