/summon minecraft:cow ~ ~ ~ {UUID: [I; x, x, x, x]} where x is a number divisible by the rarity (2048 by default)
for example
/summon minecraft:cow ~ ~ ~ {UUID: [I; 0, 0, 0, 2048]}
you need to use different uuid every time tho
/summon minecraft:cow ~ ~ ~ {UUID: [I; 0, 0, 2048, 0]} is also valid
stolen from Leo in the Discord