When you open the ur22 settings via “Control Panel” → “Hardware and Sound” or “Sounds, Speech, and Audio Devices” → “Yamaha Steinberg USB Driver” is the sample rate the same as in sonar?
The other thing is there might be a limiter on the input of the ur22 - i'm not sure - and if you're clipping it will not show it in sonar - you can test this by reducing the input gain on the ur22 and recording. If you're still getting artifacts, that is not the problem.
The only other thing I can recommend are to make sure the mic cables you're using are balanced cables, hi-z is off.