you could check 2 things
1. in windows power otions drill dwon to the additional options and make sure while on ac the minimum power is set to 75% and max is set to 100%
2. get HWINFO from https://www.hwinfo.com/ run it in sensor mode, and look at the cpu temps and make sure it is not overheating (important) if it is then that is the issue you need to address and ignore # 3
3 if #2 proves your not overheating while gaming, the get throttlestop from https://www.techpowerup.com/download/techpowerup-throttlestop/ then on the main screen you will see a check next to BD PROCHOT, you can uncheck and apply to see if your system immediately recover, if it does then it is a main board temp sensor gone bad and think your system is over heating. this removes this sensor ability to throttle your cpu. launch HWINFo and test it again to see if your cpu is running at right multiplier.