Garmin Edge 540 froze during activity, then after restarting and saving the activity it deleted it

I recently purchased an Edge 540 from 99 bikes, but it has frozen multiple times. Today, it froze at the end of my race and then when i force-restarted it the activity was still there, i rode home, saved it, it showed me the completed activity (although said 0 aerobic benefit so i am assuming it didnt really have any data but still had the map of the ride and all the stats like time, distance etc.) but then when i hit done the activity totally disappeared. I tried finding it manually by plugging it into my laptop but can't find any files that might be the ride - i looked in both the activity files, and the Newfiles and Debug folders. There were metricsbackup files dated to today so I tried manually uploading them to Garmin connect but it said that all of those files had already been uploaded.

Not sure what else to try. I am assuming the activity is lost forever. I have emailed this to garmin support as well as I think the only solution here is to replace the unit :(