Please list:
Audio interface: Sample Rate, ASIO Buffer Size
Sonar: Driver Mode, Sample Rate, Record Bit-Depth, Total Roundtrip Latency.
Also, have you tried the simple test of temporarily checking to see if the issues are caused by one or more effects plugin? You can quickly check this out one way or the other, by loading the problem project, then simply hit the 'E' key on your computer keyboard. This is the shortcut key to 'Bypass All Effects'. So, once you hit the 'E' one time to toggle the effects off, hit Play and see if your dropouts go away.
IF your dropouts go away from bypassing your effects, then one or more of your plugins is requiring a larger ASIO Buffer Size than what you have specified. Effects that require a larger ASIO Buffer are those such as Boost 11, Perfect Space, and LP-64 EQ. Some folks use an ASIO Buffer Size as large as 1024 (I think some have reported using even 2048). PLEASE NOTE that the larger ASIO Buffer Size is realistically only usable during mixing/mastering, and NOT for tracking (recording). (By the way, after doing the playback test with Bypass All Effects - simply hit 'E' again to turn all the effects back on).
If you found that your dropouts did NOT go away after Bypass All Effects was turned on ('E'), then it is quite possible that you simply have 'Hit the Roof' on the limits of what your computer can handle with the horsepower it has. In other words, it is possible that you simply cannot process everything Sonar has loaded up in this particular project. IF this is the case, you could simply begin FREEZING some things, in order to 'lighten the load'. This is something to consider - if some things are really pretty 'done' then you could freeze them and that would reduce the work the computer has to do during playback.
Another thing you could look at is a bit more obscure, but I recall it did end up helping someone in the past. IF I recall correctly, Noel had made some comments about something called the 'Mix Thread Count' variable in the AUD.ini file. Changing the value from the default of 8 down to a new value of 6 ended up reserving some threads for the OS and for other tasks. You could try making that change as well, and could always change it back if you found it did not help your situation.
So, I HOPE that something in the above is of some help to you resolving these problems for you.
Please carefully review the above, post back with the requested information, and try out the couple of things I suggested above, and let us know if anything helped.
Thanks, and hang in there,
Bob Bone