It’s a horrible feeling to see something you just created disappear. I have accientally erased original music I had worked on for hours and it is devastating. Yes, you can try to recreate it, but it is never the same.
I don’t think I could write in any application that doesn’t let you undo a delete. I don’t even write directly into Medium (except responses.) I always write in Scrivener (which has auto-save and is backed up to Dropbox) and then paste the story into Medium. So I always have a backup. And I use Grammarly to catch my usual typos and bad grammar. So I have another backup there.
I feel for you. It stings, but then you must carry on, because you are creative.