wpml deletes image files from server. it affects only images that are large and are scaled by wordpress (media file with suffix -scaled is created on the server).
howto reproduce:
1. upload image to default language, media file should be large (over 2560px) so that wp generates scaled version (media duplication is enabled).
2. delete image from secondary language or remove language from settings screen and remove content left behind
result: the generated media files are deleted from the server and media library is broken in default language as the files are removed from the server.
setup: this behaviour was observed with WP v6.4.3, default theme - Twenty Twenty-Four v1.0, WPML v4.6.9, WPML String Translation v3.2.9. no other plugins installed.
yes can confirm that that keeps the files on the server, but that would be expected - otherwise all images would have problems not only the large ones that get the 'scaled' version generated. I belive that your attachment deletion process needs refinement. Until then all default setups will have problems with large images. This causes files to get deleted from server and, if the site is not backed up, no way to get them back.
As we spent quite a lot of time tracking this issue down I just wanted to let you know about that bug so that you can fix it.
I personally don't need a solution, because for our client sites that had this problem we solved it by rezising the uploaded images so that they would not trigger that large image threshold. Disabling this 'scaled' version generation may result that the images that are loaded on the site are 15mb in size - thats way too much for a website.
Thanks for additional details. After checking further I found that this issue was already reported. I have added your ticket to our existing report so developers can consider this.