I would say that laws covering right-to-repair are almost entirely a different subject than laws governing retail competition.
Being forced to buy a vehicle from the manufacturer would be exactly like being forced to buy Indiana Jones and the Great Circle only from Microsoft. But it's a lot better to be able to buy it from multiple game stores, many of which compete on price.
Overall I think it's totally fine that Tesla wants to sell cars direct, and any manufacturer should be able to. But they should also be obligated to sell to dealerships at a fair price (they shouldn't be able to just pretend that their own selling process has no cost associated with it).