Hello,
Please read this:
https://help.heroku.com/K1PPS2WM/why-are-my-file-uploads-missing-deleted
As a short answer: That’s not a strapi’s issue. Heroke deletes everything from the server each time the dyno is restarted. That’s how heroku is working.
To keep your data:
-Database - Do not use sqlite, instead use a dedicated DB.
-Files (Uploads) - Use an upload provider like cloudinary and store your uploaded files outside the heroku’s dyno.