When I was still using macOS one to two years ago, I was using yabai [1] and it was perfect
Of course nothing is truly perfect, but I would say that after the initial learning curve, I had really pleasant and productive time with yabai.
Every configuration will have a slightly different solution, but at least there is usually a solution and it makes somewhat sense. And you can customize it to make sense for _you_, not what someone else decides makes sense. Back when I used to work in an office and used to dock/undock my laptop, i3 worked well.
I assigned workspaces 1-5 on my left monitor and 6-10 on my right monitor. When I disconnected from the dock, workspaces 1-10 would appear on my single laptop screen. When I connected it back to the dock, they switched back. I am _pretty_ sure it was all handled by i3 in the config.
The idea is not that specific combination are not solvable, but for each setup, you will have to solve issues manually or live with inconvenience due to the nature of the problem.
For our specific case, I didn't meant I was annoyed every day with my setup. I just meant I always had to fiddle a little to end up with a workable solution, each time I had more than one screen.
Don't use outdated/old Linux Distros. I almost always find out someone is using a variant of Conical's Ubuntu CD marketing and it explains why they have some terrible experience.
Updated distros usually have everything working with modern hardware working together with software. Look into Fedora.
Ubuntu/Debian/Mint need to be avoided and we need to warn people.
If you want to plug "new" at least go for silver blue or nix os, where it makes a difference.
That means no running NVIDIA GPUs for 1-2 years!
Or having broken software for 1-2 years!