Why is tailscale slow over Starlink?

I think tailscale needs some tinkering because it doesn’t work well on cgnat (which starlink is), though I can neither confirm nor deny that.

isn’t tailscale smart enough to simply not use IPv4 at all when there is CG-NAT and use IPv6 instead?

Maybe not by default, but you’d have to check in the administration panel settings for that.