Hello,
Indeed, that can happen! It is fixed already in the latest version but it has not been released yet. I will do this soon. Cheers 🙂
Great you fixed it. Another bug/limitation that came out during testing:

Images with names including ä,ö,ü are not correctly returned by the DOMDocument and therefore not recognized as being used (then they falsely get trashed).
The following modifications in core.php fix it:
// converts all special characters to utf-8
$html = mb_convert_encoding($html, ‘HTML-ENTITIES’, ‘UTF-8’);
// Resolve src-set and shortcodes
$html = do_shortcode( $html );
$html = wp_make_content_images_responsive( $html );
// Create the DOM Document
$dom = new DOMDocument(‘1.0’, ‘utf-8’);
@$dom->loadHTML( $html , LIBXML_HTML_NOIMPLIED | LIBXML_HTML_NODEFDTD);
The idea behind it came from: https://www.php.net/manual/en/class.domdocument.php#118509
It can be worth checking if the whole code is required or not to fix the issue.
Thanks a lot for this code. I didn’t come across the issue before, as normally, those non-ASCII characters are renamed by WordPress after upload. I will integrate your code and run a few tests to see how it goes 🙂