I don’t see how this is a legal problem for Twitter, at least in the U.S. They are not a dominant force on the Web or even in social media; they have little market power. And any data that shows lots of people leaving for other social media platforms would actually help prove that competition is strong (ironically).
Free speech cuts both ways. It’s legal for Twitter to block links to Mastodon for the same reason it was legal for them to block the sitting U.S. President from posting.