/Engine/Source/Runtime/ApplicationCore/Public/GenericPlatform/GenericPlatformApplicationMisc.h
Returns true if the specified application has a visible window, and that window is active/has focus/is selected
static bool IsThisApplicationForeground()