Windows resize to maximum for no reason
Are you accidentally double clicking the window's title bar?
In modern versions of macOS, double clicking a window's title bar mimics the behavior of the old &quot;Zoom&quot; button that was semi-replaced in OS X Yosemite. I find that I sometimes activate this behavior accidentally.
To disable the behavior, go to System Preferences ➞ Dock and uncheck &quot;Double-click a window's title bar to (Zoom)&quot;