I have a Ryzen 9 3950x paired with an RTX 3090 and i've had this problem for quite some time now though i can't remember when exactly it started. It usually runs normally and it takes like 8 hours of idle to make it slow down to 0.54 ghz (not everytime though) or 2-3 hours of "more intense gaming" meaning games like Helldivers 2, Cyberpunk 2077, etc. Turning off or restarting the computer doesn't help, the only way to make it reset back to normal is to turn the PSU off and on after that it immeditels fixes and the cycle repeats.