https://bugs.winehq.org/show_bug.cgi?id=57465
--- Comment #7 from RĂ©mi Bernon rbernon@codeweavers.com --- Thanks, I was able to reproduce the issue I think. It still seems to be an WM bug, where KWin gets confused and believes the window starts maximized when it shouldn't, and then believes it's already maximized when you click on the button and doesn't send the corresponding unmaximize event.
The changes in https://gitlab.winehq.org/wine/wine/-/merge_requests/6909 are fixing the issue for me, and the window doesn't start in the maximized state, but can then be changed back and forth without issues. Could you confirm whether it fixes the problem for you as well?