First of all, sorry as I have more than one thread. I had posted elsewhere on this forum about my issue but then started a new thread after figuring out the problem exactly. Therefore I am posting here and not there.
——————————————
After speaking to AIO SEO, Uncode devs and WP Bakery, I keep getting referred to the other party.
First of all, I’ve disabled every plugin now including WP Bakery. So its not that, but it is a conflict between Uncode Theme and AIO SEO.
AIO SEO said why it cant be their plugin and thats fair enough, but Uncode Author came back to me and said this.. I didnt even realise it was every URL that had sitemap.xml on the end.
Anyway… from dev:
Please, first of all consider that the issue is with 404 page and URLs managed by All In One SEO plugin, not with the sitemap, since any URL that ends with sitemap.xml returns the same result:
https://domain.com/qwerty-sitemap.xml
https://domain.com/lorem-ipsum-sitemap.xml
https://domain.com/hello-world-sitemap.xml
So, as I said, the issue is due to All In One SEO plugin, it is a conflict with it, since if you disable it and reload the pages above you’ll see the regular 404 page.
After saying that, we’ll definitely try to find the culprit, but it is an incompatibility between (I guess) how Uncode allows to customize 404 pages and how All In One SEO manages URLs, since Yoast doesn’t have this kind of problems, and also the new native Site Map of WordPress 5.5 works fine