Issue with full screen trackpad shorkey: halp

I'm new so please be kind.

So I've just added a trackpad action (five finger click) to made the window go full screen.
When I do it it works but when I want to de-maximize the windows, I click again with 5 fingers and sometimes it glitches: the windows de-maximize BUT a frozen window of the de-maximize windows appears, and I can't do anything with it despite closing the whole app.

Did I did something wrong? is the maximize action not ok for de-maximising the app? thanks a lot!