Multi-Monitors: Locking machine moves windows to different monitors

Solution 1:

I had the same issue and changing the cables / adapters fixed it. My 2 monitors were plugged through an hdmi-hdmi cable going in an hdmi-usbc adapter. Changing one of these to an hdmi-usbc cable fixed the problem.