Which Monitoring program are you using to get the CPU Temperatures?
What is the Make & Model of your AIO CPU Cooler?
Your Ryzen 5 4500 Processor has a Maximum Operating Temperature of 95c. Once it reaches 95c it will start to automatically throttle or slow down and if the Temps keep rising will shut down the PC to prevent damage to the CPU.
The TDP Rating for the 4500 is 65 Watts. So you would need a CPU Cooler rated at minimum 150 Watts to prevent your CPU Cooler from running hot or overheating.
Seems like your AIO CPU Cooler is not working correctly, not installed correctly, Poor Air Circulation inside your PC, or isn't strong enough for your CPU.
NOTE: If this was the same AIO for both processors that is a strong indication the problem is with your AIO CPU Cooler or poor air circulation inside your PC case.
Please post your PC information.