You're just re-describing the behaviour I already described as irritating; did you perchance reply to the wrong comment?
Scenario: I'm in a terminal doing something, and I have a second window I'm switching back and forth between that contains the man page for a command. In isolation, I haven't given you enough information to tell whether I should be pressing opt-tab or cmd-tilde to swap windows: maybe the man page is in a browser, or maybe it's in a second terminal.
Scenario: I'm switching back and forth between an editor and some reference document in another window; you can't tell which key I should press to swap without knowing if I'm looking at the document in another editor instance or a browser window.
Scenario: I'm switching back and forth between a terminal and some reference document from a cloud provider. You can't determine which key to press to swap without knowing if I'm ssh'd in a terminal or using a web-based cloud terminal.
Scenario: I'm switching back and forth between an image editor and a client's low-resolution logo they emailed me. You can't determine which key to press to swap without knowing if I'm looking at the reference image in another image editor window or a browser.
There are some apps that change that behavior if you want. [0]
I didn’t reply to the wrong comment, I was just trying to be helpful.
This OS behavior has seemed second nature to me ever since browsers implemented tabs. Like in each of your described scenarios I usually forget which browser tab is in the foreground when I switch, I will have to Ctrl+tab until I find the relevant one. It will stay on top once I do though.
That is what MacOS does; the window of an app you had in focus last will stay on top of the stack. It makes intuitive sense to me personally but I agree it does make finding stuff a little onerous.
In your scenarios, you know which applications you have your relevant documents opened in so once you have them on top switching is easy. But again, I understand that a decade of muscle memory and using a different paradigm will make this behavior infuriating.
Scenario: I'm in a terminal doing something, and I have a second window I'm switching back and forth between that contains the man page for a command. In isolation, I haven't given you enough information to tell whether I should be pressing opt-tab or cmd-tilde to swap windows: maybe the man page is in a browser, or maybe it's in a second terminal.
Scenario: I'm switching back and forth between an editor and some reference document in another window; you can't tell which key I should press to swap without knowing if I'm looking at the document in another editor instance or a browser window.
Scenario: I'm switching back and forth between a terminal and some reference document from a cloud provider. You can't determine which key to press to swap without knowing if I'm ssh'd in a terminal or using a web-based cloud terminal.
Scenario: I'm switching back and forth between an image editor and a client's low-resolution logo they emailed me. You can't determine which key to press to swap without knowing if I'm looking at the reference image in another image editor window or a browser.
I run into this constantly.