I've had both and Sonic does not come anywhere close to being as good. The only other chain that I've had (and I know there are plenty that I've never tried) that is almost as good is Whataburger.
I really like burgers, but I crave fresh ones. My DH laughs that I have been on the quest for great burgers where we live. We've found two places (possibly three). There is no comparison for frozen to fresh ground burgers.
Suzanne