Background Processing of Joystick/Gamepad Input when not in focus

You always have your Input processing, probably you’re confused with Input mode concept.
You can pass your input data to UI only, Game Logic only or both if you want to.
In PlayerController look at Set Input Mode Game/UI/Game&UI nodes