After some playing around, I found out that startViewTransition animates snapshots of the whole page instead, and that's 5 animations for the same job, with a gradient fading along with everything else rather than snapping. I did however find a React thing when using this function and it's that the new palette has to be in the DOM inside the callback which means the state update needs flushSync.
document.startViewTransition(() => { flushSync(() => setTheme(next)) })
I'm not sure this is the right way to do it, but I wrote down every number that I measured.