I also have lag issues in CbB and Sonar with a Babyface Pro. In my case I have an i7-6700 (and run Windows 10), not a Ryzen like some prior posts mention.
I got the Babyface Pro one year ago, and don't recall any lag issues at that time. My use this year has been very intermittent, I first noticed lag about 4 months ago. The lag is not with audio, it is UI response lag. Clicking on a Mute button can take 1 second (more or less) for the UI to update, same with track operations like drag & move, copy & paste. I tried various settings in RME TotalMix with no difference, and it is not dependent on audio buffer size setting.
I did find something that improved things, with setting all audio track inputs to "None", and having only the Master output bus going to the hardware out. After recording guitar and bass tracks, I always left the track input set from recording. The more tracks that were set this way, the worse the lag was. Setting all audio track inputs to "None", and a single hardware out improved the lag dramatically. This behavior seems specific to CbB & Sonar. It does not occur in a couple other DAWs I have (R* and S* O*).