Thanks for creating the script!
When the script throttle on a ROCK pi 4b+ which is a rk3399, the cpu frequency goes to minimum 408MHz.
When it unthrottles it never raises the frequency. It's stuck at the minimum even when it's trying to unthrottle.
(I also noticed the script uses cpu0 to calculate max frequency. This processor is a big.little and the max frequency happens on cpu4 and cpu5).