When you drag the title bar of a maximized window and then drop it to another location, the window will restore its original size. To prevent accidental drag and drop, you can disable dragging of a maximized window in Windows 11 / 10.
How to Prevent Dragging a Maximized Window in Windows 11 / 10
Open Registry Editor and navigate to the key: HKEY_CURRENT_USER\Control Panel\Desktop
. Next, double-click the string value named DragFromMaximize on the right pane.
Change its value data from 1 to 0, and click OK.
Close Registry Editor. Restart your computer or log off your account to apply the change. You’ll find that you’re unable to drag maximized window any longer.