baseURL + subfolder + translation = problem?

I have a website with default language and fr. In order to generate correct fr menu links, I use what is given in the documentation:
<a href="{{ .URL | absLangURL }}">{{ .Name }}</a>

But my baseURL is set to “example.com/folder/” and thus links are created to /example.com/fr/folder/ instead of /example.com/folder/fr

If I change baseURL to be just “/example.com”, everything works normally.

Where did I do something wrong?

After doing some tests, I realise that absLangURL is giving the correct answer: “/example.com/folder/fr”. So the problem seems to come from .URL that spits out
/folder/whatever.

By what should I replace .URL?

After some more investigations, here is the typical behaviour:

baseURL = "http://site.com/folder/"
defaultContentLanguage = "en"
[languages]
[languages.en]
[[languages.en.menu]]
name = "Example"
url = "/example/"
[languages.fr]
[[languages.fr.menu]]
name = "Exemple"
url = "/example/"

Inside the content folder content, we have the two files example.md and example.fr.md. Now while browsing at page site.com/folder/fr/example/
we have:
{{ .URL }} = /folder/example
{{ "" | absLangURL }} = http://site.com/folder/fr
{{ .URL | absLangURL }} = http://site.com/fr/folder/example

I am a complete beginner in Hugo so I don’t know if everything is doing what it is expected. Any thoughts?