Reset maximize classes when the drag handle is moved

Fix #3127
Fix #3126