After clicking maximize, the window maximizes as expected.
If I move the window after maximizing, the minimize does not work. It works as expected if I do not move the window.
After moving window, if I spam the minimize/maximize button, on 3rd click it minimizes, and the window behaves as normal after that.