Can you please confirm you are using the most recent Yoast v9.5? You can learn more about updating here: https://kb.yoast.com/kb/how-can-i-update-my-free-plugin/
Can you confirm you are using WordPress 5.0.3? You can check by clicking on the W in the top left and selecting About. If you need to update, please check with your host provider. Please know that if you are using an older version of WordPress Core you may experience unexpected behavior with Yoast. This guide explains more: https://yoast.com/why-we-dont-support-old-wordpress-versions/
If you update to the most current version of WordPress and Yoast SEO, does this resolve the issue?
If the issue is still occurring after confirming both Yoast SEO and WordPress are updated, this may be due to a plugin or theme conflict. Can you try and gather as much information for us as possible? Please perform the following:
1. Make sure the issue doesn’t persist when Yoast SEO is disabled.
2. Check for conflicts.
3. Check for JavaScript errors with your console.
If you find any JavaScript errors related to Yoast SEO or if there is a conflict with a plugin or a theme, you can create a new GitHub issue for our developers. Please report the issue to a third party developer as well.
If you didn’t find any conflicts or errors, we think the issue is specific to your site. We’d need to investigate further but are unable to do so on these forums. You can purchase Yoast SEO Premium and receive our Premium email support and we can help you further.
I confirm I have already Yoast v9.5 and WP 5.0.3
so I will start to check all the next points:
1. Confirmed that issue doesn’t persist if Yoast SEO is disabled.
2. working in progress…
This behavior may be part of the Yoast media settings. Please check the following:
Admin > SEO > Search Appearance > Media
Does changing the Redirect attachment URLs to the attachment itself?
setting to No
remove the unwanted redirect behavior?
That’s it! Thank you, we solved!