No sound after freeze

My computer often freezes for a short time especially when using effects and after each freeze, it stops outputting sound. I can then change the ASIO driver in Studio Setup window to “built in Audio” to listen to the sound again, but in order to hear sound through the Audio Interface (RME Babyface Pro FS), I have to restart the computer each time.

Can anyone please advise about this issue if you know how to solve it?
It will be much appreciated.

iMac (Retina 5K, 27inch, Late 2014) Big Sur
Processor: 4 GHz Quad-Core Intel Core i7
Memory: 32 GB 1600 MHz DDR3
Graphics: AMD Radeon R9 M295X 4GB

Cubase 12 Elements version 12.0.70.