Really long story:
It’s the combination of using HUGO_CANONIFYURLS=true and a BaseURL with a subdir (which is used for https://themes.gohugo.io/)
And some involved magic as hugo knows where a url is written - but not always…
See here for an example.