I have a B450 M motherboard with a RX 5600 XT Gpu and a Ryzen 5 2600. I’ve been having this weird issue where my games frames would perform terribly whenever I played. And I noticed tabing in and out would fix my frames but it would go back down a couple seconds later or it’ll sometimes keep the normal frames. I’ve updated my drives, deleted and reinstalled them. But didn’t help anything. (This been happening for a couple of weeks now, this has never been a issue in the past)
Temps are ok? when you alt tab the GPU will temporarily will be close @0% usage so it will cool down then. When after you go back in game temps will be a bit lower and thus better peformance would be my guess. Put fan speed at high speed of your 5600 XT card and see if you get better performance then.