How to enable mouse leaving window for applications which prevent it?

Games often do this, as well as other applications like GeForce Now. Even when I stop them being full-screen and instead just maximised they still do this. Is there any way in KDE or some other plugin to prevent this behaviour on a per-application/window basis?