Wanted this to exist for so long. I’ve started learning Swift to build an app to solve this. Then I discovered HammerSpoon[1] and since I use a HammerSpoon lua script to adjust the windows layout for my different setups:
1. Laptop only mode
2. At home my MacBook screen is closed and connected to 2 external monitors
3. At work my MacBook screen is open and connected to 1 external monitor
The script detects the connected screen UUID and applies the appropriate layout
It's a little baffling how MacOS hasn't been able to get this to work. If a Matrox TripleHead2Go could hit a high enough resolution for multiple monitors it might be a possibility.
It did improve with a few tweaks but every so often it forgets.
First I thought it was a Macbook Pro thing. But a Mac Studio, with 3 separate monitors plugged into it, was just as confused.
I'm not sure how Windows and Ubuntu can handle it just fine from my experience.
The script detects the connected screen UUID and applies the appropriate layout
[1] http://www.hammerspoon.org/