Sonar will stop automatically in playback mode when it sees no more data or audio past a certain point.
If a track has a series of dots down the center of it, that indicates there is something further to the right. Sonar will play to that point. This seems to happen most often when I import audio and midi. If I create a new track and record audio to it, that mysterious stuff to the right never occurs.
I have had a few tunes that had silence about as long as the song itself..... somehow, something was placed well tot he right in one track.... look for the dots........................................................... follow them and you'll find it.
I always export my files to a certain folder on the desktop and then I re-open them with a WAVE EDITOR from NCH called WavePad. Its free. I use it to trim the count in silence and also to trim the end of the song. Every song I export has silence in both locations and I want the song to start less then 1 second from the start and stop when the last reverb trail has faded sufficiently so it doesn't sound chopped off.