It's not just Sonar I've seem this sort of behaviour in, I've had it happen in Photoshop and Lightroom in the past as well. Stuff that should have been saved either not being there after an application crash or there but an "older" version missing the editing done in the session that crashed.
My safety measure has been frequent auto-saves, versioning and frequent use of "save as". And frequent back-ups. One thing nearly 40 years of computer use has taught me is that data that exists in an application, which means in RAM only or maybe as a temp file as well, is a ghost until it's saved to permanent storage. And until that's backed up to a different drive, not just a different partition on the same drive, it's just a slightly less ephemeral ghost. And data on punched paper tape was just as temporary, as the readers were quite capable of chewing up the tape to the point they couldn't read it.
Window's partial answer to the problem is the "system restore" function, though it's far from bullet-proof. Apple's is Time Machine which by default backs up all new data to whatever drive has been selected for the purpose on an hourly basis. The problem is that's fine when working with "typical user" amounts of data, where most big files like media stuff gets written once then left alone and the user isn't creating maybe hundreds of megabytes of data every hour - which is exactly what DAWs and video editors do. Both approaches can eat up huge amounts of disk space, and Time Machine can be endlessly churning away trying to keep up.
So "save as" often, use autosave and use versioning. And as soon as you're through with something, back the data up to another drive.
As for losing current data when Sonar crashes, I wonder to what extent the Windows file-writing system is at least partially responsible. It's meant to not store as soon as the "save" command is used, but instead to tag the cache of data in RAM as to be stored then write it to disk when system usage gives it a suitable "gap" to do it in. By default Window's caching is "off" in Sonar and in theory audio is written to disk as it's recorded - a practice that goes back to the days when RAM was measured in MB not GB and an audio file would rapidly occupy all the RAM if not streamed straight to (and from) the disk. It should also protect against the loss of recently recorded audio if the application crashes because that audio should have been written to disk as it's recorded.
Yet sometimes it isn't there, which makes me wonder if the data is on the drive but Windows hasn't yet written the relevant file table entries so can't see it. Only software that can find chunks of long-deleted files can't find the data either.
So I guess we're stuck with the "save early, save often, version and save-as" routine.