The Top Edge Trap
Ubuntu’s GNOME desktop environment incorporates several window-snapping features designed for quick multitasking. One of the most prominent features is top-edge snapping. If you click the title bar of a window and drag it until the cursor touches the very top edge of your screen, Ubuntu will display a translucent overlay and automatically maximize the window to fill the entire display. While this is a quick way to enlarge a window, it is incredibly annoying if you are simply trying to move a window higher up on your screen to see something underneath it, resulting in accidental, jarring maximizations that disrupt your workspace layout.
Disabling Window Snapping
To retain full manual control over your window placement and stop Ubuntu from automatically maximizing windows when dragged to the top of the screen, you must disable the Edge Tiling feature.
Open the Settings application (you can find it in the app grid or by clicking the system menu in the top right). In the left-hand navigation sidebar, look for the Multitasking tab and click on it. In the main Multitasking window, look for the section labeled “Active Screen Edges” or “Window Tiling” (the exact wording depends on your specific Ubuntu version). You will see a master toggle switch for Edge Tiling (which explains that it maximizes or tiles windows when dragged to screen edges). Click this toggle switch to the Off position. You can now drag your windows freely anywhere on the screen, even bumping them against the top panel, without them ever automatically resizing or maximizing.