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.