Thanks for the suggestions Tom. I use Analog Audio 1+2 as outputs and spdif as recording inputs.
But I have had another thought as to the cause of the problem.
My project tempo is 84bpm but the musical quarter note pulse of the music is 105bpm. In other words my musical beats are 3/4 the length of the project tempo beat. Sounds crazy I know but it's to do with the LFO clock speeds I'm using to modulate the main groove. I wonder if this is messing up Sonars delay compensation when I hit record.