Reset maximize classes when the drag handle is moved

Fix #3127