/Engine/Source/Runtime/Engine/Classes/GameFramework/PlayerController.h
If true, then the GameViewportClient should call FlushPressedKeys on this controller when it loses focus. The default behavior here is to return true if the PlayerController is in any input mode other than GameAndUI
virtual bool ShouldFlushKeysWhenViewportFocusChanges() const