之後參考這篇文章
https://superuser.com/questions/990398/setting-display-resolution-beyond-1024x768-with-headless-windows-10
與這篇
https://www.tenforums.com/graphic-cards/10681-tutorial-how-change-windows-10-default-resolution.html
開啟regedit調整[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\GraphicsDrivers\Configuration\NOEDID_8086_9BC8_00000000_00020000_31043^EBC0ABC299D6939F3DD01C951673F09F]
底下的所有PrimSurfSize.cx PrimSurfSize.cy ActiveSize.cx ActiveSize.cy,把數值由1024x768改為與螢幕一樣的1920x1080
之後不管是switch切換、或是直接拔掉HDMI,工作中的視窗沒有再被自動調整位置與大小了
請試試看