I've just created the following script to simplify the "learning curve" for the CPU frequency scaling. I hope that having set the mode and frequency using the cpupower utility, it will end the unexpected changes.
(edit #3: NOTE: I re-wrote the script to add a few more checks and balances to protect the user. )
(Sep 9 2024: In Addition to extensively modifying my script, I decided to move it from here and put it under its own topic for Tips & Tricks.