this happened to me in Pencil2D a while back where i lost half of an episode i was working on and i was so freaking pissed because i was at the background stage and was just about to export.
THANK GOD i had a version with just the lineart and colour saved in Discord (because i was trying to show off) and while i lost all the shading and had to colour all the white spots in the frames with pink so i could at least edit the backgrounds in; it taught me to always' save as' instead and kill my storage