Application lost focus event

I know this is an old thread, but I haven’t seen anyone with a blueprint solution yet. After exploring plugins on fab, I found a node plugin that does the job!

The plugin is called .exe Extension & Process Management by Kibibyte.

This is an example of a function that locks the mouse to the middle of the screen during gameplay and releases it when the window loses focus.

The plugin costs $20 for the personal license, which was worth it to me.