Hi,
Supposing that you're using the sitemap plugin we propose on our website, the goal of this plugin is to add entries to the sitemap for each category and each product that can be reached from each menu item of your website.
To avoid HikaShop adding several times the same product in the sitemap, there is a setting in the plugin we propose for that.
And the plugin automatically uses the canonical URL if set in the product instead of the calculated URL.
If you use anothe sitemap plugin or an extension which doesn't need HikaShop's sitemap plugin to generate the sitemap URLs, then you should ask the support of that extension and not us as we don't know how it is done nor how you could change it.