I found a fix that works for my case (PC desktop). Even if you're on a laptop, I'd give it a try as it's easy to revert the changes.
I tried turning off the Virtualization settings in BIOS as mentioned somewhere earlier in this thread but that only exacerbated the problem so I went back to turn them on again.
What solved it for me, and I can reliably reproduce this, is dialing down on the Processor power management in Power Options.
Go to Control Panel (or type in Power Plan in Windows search bar) Hardware and Sound > Power Options > click on "Change plan settings" for whichever plan you're currently using.
Click on "Change advanced power settings" at the bottom.
Expand "Processor power management" and set "Minimum processor state" to 5% and "Maximum processor state" to 99% in my case down from 100%.
Do a restart and afterwards go back to check the values you've just changed to ensure the system displays them. In my case, I have a msi software that forces on the Ultimate Performance power plan after a restart so I had to drop down to 99% from 100% on that plan.
With these changes, I no longer hear the fans going crazy at the logon screen or during gaming and I don't notice a drop in processing power though technically there is a 1% difference. CPU temps during gaming are anywhere between 50 - 60 C instead of 90 - 95 C.