Can't personally confirm that it works this way in-game, but the way I understand it is that when a Max move that change the weather targets a Pokemon with Sand Spit, the weather changes from the Max move first, then into a sandstorm from Sand Spit.
It seems to be happening the other way around on PS.
https://replay.pokemonshowdown.com/gen8ou-1025101632
It seems to be happening the other way around on PS.
https://replay.pokemonshowdown.com/gen8ou-1025101632