Interstate commerce being a federal power under the Constitution prohibits states acting to regulate interstate commerce where the federal government has acted, without the permission of Congress, and prohibits the States from discriminating against out-of-state commerce generally. That doesn't mean that all State regulation of interstate commerce is prohibited, but the State's power is sharply circumscribed by the mere designation of the federal power as well as by federal action exercising that power.
AFAIK, Tesla's argument in the cases over the direct-sales rule has been that the particular rule is a violation of the Commerce Clause at least as applied against Tesla's online sales, though I don't think any federal court has yet ruled on the specific issue.