sitemap.xml with empty space on line 1

I have an add-on that generates a site map and creates a redirect for a multi-site installation. When the site map is generated, it is stored in the upload directory of the individual blogs: /wp-content/blogs.dir/1/sitemap.xml but it is available through /sitemap.xml

When you access the site map through your actual location, it works as expected without adding an additional line. However, when you access it through the redirect, an empty space is added to the first line of the site map, which causes an error to be generated.

I researched this problem in several support forums and they all indicated that an additional line at the end of the topics functions.php (after?>) Could create this problem. Alternatively, an additional line in wp-config.php, index.php or other add-on. I reviewed all these options in vain.

A suggested solution was to use the Health Check plug-in, which disables all add-ons and changes the theme to its default value, then allows you to activate the add-ons one by one to try to find the problem. Again this did not provide a solution.

With all add-ons disabled and the default theme installed, the redirection for the site map still existed and resulted in the addition of an additional line.

As such, I began to wonder if this is a central WordPress problem and I reinstalled all the Core scripts, but again it was in vain.

I have looked through the error logs and nothing.

Any comments on where you should look next to try to solve this problem would be greatly appreciated.

Thank you,