If you "tab out" from a true fullscreen game, the game is minimized by Windows and the desktop is shown, and minimized games are usually not rendering, so OBS isn't able to capture game updates while the game is minimized, so the image stays frozen or turns black in OBS. That's a Windows thing, not OBS.
If you need to change to a different program, you need to run your game windowed fullscreen. This way the game stay visible in background if you alt-tab to a different app. To avoid that other app become visible in OBS, make sure you use game capture and not display capture.
If you just want to check some status or data in that other app without interaction, consider using a second monitor to avoid switching in the first place.