Then the problem in the macOS is that it doesn't re-arrange when the "new" monitor comes back into display. The previous arrangement when that monitor was on must be remembered. And when that monitor comes back to display, that arrangement must be applied. Otherwise it is quite annoying when displays swap making unable to draw the mouse pointer across and worse when direction (horizontal/vertical) was getting messed up due to this issue.