/Engine/Plugins/Runtime/CommonUI/Source/CommonUI/Public/Input/CommonAnalogCursor.h
A ridiculous function name, but we have this exact question in a few places. We don't care about input while our owning player's game viewport isn't involved in the focus path, but we also want to hold off doing anything while that game viewport has full capture. So we need that "relevant, but not exclusive" sweet spot.
bool IsGameViewportInFocusPathWithoutCapture() const