Unreal engine games frozen when focuse

My problem is that whatever unreal engine game I play, it is frozen when focused. I have to alt-tab out of it and back in for the screen to update. If I click on an option in a menu, I have to alt-tab out and back in to see the next menu. At first it happened in “2000 to 1: A space felony” and I chalked it up to my old hardware or something. I recently got a new CPU and motherboard, but the problem still persists. Tested the problem with ARK, 2000to1 and The flame in the flood.

My specs:
MotherBoard: Gigabyte AB350-Gaming
CPU: Ryzen 7 1700
GPU: Radeon R9 270X
OS: Windows 10 Pro 64-bit