You mix a bit of terminology. There can be only one app in foreground. It's the one app that has the focus. It has its window title active and receives the keystrokes (no hotkeys). Everything else is in the background. Apps in background can either be "always on top", which you seem to have activated for OBS. "Always on top" only makes the app window not obscured by other app windows, but if another app has the focus, even an "always on top" app is in background. Apps in background and not always on top are either simply in background with other apps covering or obscuring their window, or minimized. Minimized apps don't have their app window on the desktop at all, their window can be restored by clicking their icon in the task bar.
This all has nothing to do with hotkeys. Regardless of the app state of OBS, foreground or background, always on top or minimized, OBS should receive and process any hotkeys it has defined. It cannot process hotkeys only, if the currently active app is running as admin and OBS is not running as admin. This is by Windows security to avoid malware scanning keys entered into administrative apps. In every other case, it will receive hotkeys. If it is not working like this for you, check for other hotkey processing apps that might change hotkey handling, and check you defined the hotkeys correctly in OBS in Settings->Hotkeys, and check again if you're really running the app you're trying to capture not as admin.