When your canonical tag and your sitemap point at different URLs, Google doesn’t resolve the conflict by a fixed rule where one of them wins. It reads both as hints rather than commands, and weighs them together with your internal links, your redirects, and the content itself before deciding which URL best represents the page. So the plain answer to which one wins is neither. A disagreement between them doesn’t hand victory to the sitemap or the canonical, it weakens both and pushes Google to make its own call.
That is why a clean-looking canonical tag can still be overridden. When the sitemap lists one URL and the tag names another, Google’s confidence in your stated preference drops, and it leans harder on the other evidence. Internal links carry the most weight here, since they act as a running vote for which page your own site treats as primary, and if they point at a third version, Google may settle on that one. The tag didn’t lose to the sitemap; the mixed signals left Google to choose, and it picked what looked most consistent across the site.
So the lever isn’t working out which signal ranks above which, it is removing the disagreement. Make the canonical tag, the sitemap entry, and the internal links all name the same URL, so every signal tells Google the same thing. When they agree, Google has a clear reason to honor your choice; when they fight, you have handed the decision to Google by default. Audit the three together and align them on the URL you actually want indexed, rather than guessing which one dominates.