My setup: the build-in display of the laptop and an external one (HannStar Display Corp 32'') connected via HDMI.
After I am away for a while and the monitors are going to sleep, often (not always) the following happens: only the build-in monitor awakes, if then I again join the displays, then distribution of the apps is changed, so they are moved to the build-in display and the virtual screens (ctrl+alt+left/right arrows) are squashed into one.
This is very similar to this issue but I can easily turn back the external display. The problem is that the distribution of apps is changed.
Ubuntu 21.10
Dell Precision 3561 (build-in display: 15,6" IPS (3840 x 2160))
Graphic: NVIDIA T600, 4GB using nvidia-driver-510