I saw that there was a problem with the filters already 6 years ago here:
https://ww.wp.xz.cn/support/topic/plugin-google-xml-sitemaps-bug-in-sitemap-generation-when-using-post_link-hook?replies=4
Is it possible that ir broke again in versions to the one we have today?
After some investigation I found source for the error. Another plugin is usding the
add_filter('post_link', ..
and
add_filter('post_type_link',...
WordPress filters. I’m trying to find out more….