You need to check the web.base.url in the Technical -> System Parameters after enabling developer mode. BTW the value of this parameter changes every time you logged in with Admin user using different URL. Also check if system parameter
web.base.url.freeze if set to True, So you can change
web.base.url to your new URL and use
web.base.url.freeze to freeze it.
In order to delete the cached version of /sitemap.xml, go in the backend with technical features activated for your user, then go to Settings > Technical > Database Structure > Attachments, then in the list view, search for sitemap. Delete the /sitemap.xml record and reload the url.
If you are using nginx or apache you need to check the configuration as well.