I'm having exact same issue with this laptop on a 2300u. It throttles down as soon as you unplug it. If you have Task Manager open you'll see it drop down and then spike back up. If you have the laptop turned off or in standby then it won't throttle back up until you reboot or plug it back in. Very frustrating and I haven't gotten anywhere with HP support on it yet. I've tried completely resetting the windows install and different power options (even setting minimum CPU level) but it seems to ignore all that. So.. I'm wondering if it's more of a firmware issue in the chipset (also interesting that it's throttled when unplugging it even when completely powered off)
I have a different HP model that also have the Ryzen 5 2500U. On power, the Vega 8 won't go past 400 Mhz running CAD, but if I run the the GPU-Z ?pcie render test it does go beyond +800 mhz.
Registered here just to reply to this post to say I'm having the exact same issue with a HP 15-cw0597sa with a Ryzen 3 2300U processor.
If the laptop is on charge and it is put to sleep, then the AC adapter is removed without first waking the laptop, the CPU gets stuck at 400mhz, as soon as the AC adapter is reconnected, the CPU jumps up to maximum speed, if the adapter is then removed, the speed is throttled to 400mhz again, the only way to resolve the issue for that session is to restart the computer.
This has to be a firmware issue of some sort, its strange that only HP laptops seem to be affected, if it was a widespread Ryzen Mobile issue, there would be more than just a couple of posts found when you search for Ryzen 400mhz in Google.
HP are 'supposedly' looking into the issue for me but I won't hold my breath. If its not resolved before the warranty runs out, I will be tempted to exercise the warranty to get them to replace the laptop as its 100% reproducible.