This is more of a workaround than a fix. As proposed by Bastian Beischer in this thread you can change how the window obeys the changes in geometry.
As some names of menu entries have changed, here is an updated version:
- Right click on the title bar.
- Select More Actions → Special Application Settings
- In the Size & Positions-Tab activate Obey Geometry Restrictions
- Set the value in the drop-down list to Force and keep the radio button next to it on No
This solved the problem for me. It worked for all instances of Emacs on my machine and did so persistently after restart.
It also works on Ubuntu 16.04 with Plasma 5.5.5 and Emacs 25.2.
Emacs 29.0.50 and Kwin 5.25.5 also work.
Edit:
I tried to figure out what the difference between Special Window Settings and Special Application Settings is. This answer over on SE Unix&Linux suggests this change would only apply for the specific window, but I could not reproduce this. For me it changes for all windows.