fwiw, here are the registry entries for a 1080p HDMI monitor to prevent windows from automatically changing the screen's resolution when the HDMI monitor is off and cannot be detected by windows.
Since windows' default values are for a smaller screen, when windows resizes the screen, in addition to windows being resized and moved, if the desktop icons are laid out so that the layout exceeds the default screen size, the icons are automatically rearranged to fit in that default screen resolution.
HKLM\SYSTEM\CurrentControlSet\Control\GraphicsDrivers\Configuration\SIMULATED_...\00
PrimSurfSize.cx = 1920 (dec)
PrimSurfSize.cy = 1040 (dec)
Stride = 10240 (dec)
The "..." in the key represents a long alpha/numeric string that is part of the keyname. I have no way of knowing if this part of the keyname that changes with machines, but there should be only one "SIMULATED_..." entry.
Since setting the first two values over a year ago, I have had no window size problems and after discovering the "Stride" entry and value, I have had no problems with window and icon positions.
Hope that this information is of value.
Beverly Howard