In the generated client code, the final URL is generated like: const url = new URL(path, configuration.baseUrl);.
This means that if path has a leading slash, any path component of configuration.baseUrl is ignored.
According to the OpenAPI spec, such a leading slash is mandatory, meaning that any path component of the baseUrl is never used.
Stripping off the leading slash of paths before combining would fix this problem. Ensuring that path components of baseUrl end with a trailing slash would also be useful.