Source (required if based on other people's work): https://github.com/Aetf/kwin-maxmize-to-new-desktop
Mac OS like maximize to new desktop.
* Move window to a newly created virtual desktop when fullscreen.
* Move window back to original desktop when restored to normal size
This is triggered by window **FULLSCREEN** not the normal maximize. Window fullscreen can be enabled by right clicking on the window decoration -> More Actions -> Fullscreen.