There is no patent protection on cell sizes or external formats. However, chemistries, internal construction, connectors, cell-level protections, balancing, equalization are examples of things that can be and are the subjects of patent protection. So, your question whether Panasonic can sell the same cells to other manufacturers [of anything at all] is certainly part of commercial agreement with Tesla.
In short, ignore the 2170 cell format, that is not significant. Tesla has multiple, as in more than one, 2170 chemistries now in production. Powerwall, Powerpack and Model 3 have different chemistries. Tesla Semi may have chemistry different than Model 3. Powerpack also may have different chemistries depending on whether they are deployed for standby emergency power, peaker, or off-grid deployment with photovoltaics or wind power.
So far we do not know the precise commercial details between Tesla and Panasonic. Both of them benefit from Panasonic continuing to be a major global battery supplier.
We do need to be aware that the Jeff Dahn relationships with Tesla, not Panasonic even though Dahn continues other relationships too.
Jeff Dahn
By virtue of that relationship and tesl's own work in battery management systems, charging technology and renewables integration we can also assume that Panasonic will benefit from those developments also. Many such developments so far seem to be the subject of Tesla-owned patents. There are dozens of those, in aggregate they present the story of continuing innovation although individually nobody knows what might be commercialized when. There are numerous threads here and elsewhere about the state of such innovation.
From the perspective of an investor in TSLA I think we can be assured that Tesla is well ahead of any other industry participant today, but there is probably enough evidence to suggest that BYD is the cheapest producer today, partly because they do not optimize for weight, power density or energy density, but do optimize on price and accessibility of raw materials. So, Tesla continues well ahead of anybody else due to their obsessive attention to BMS, cell-level-metrics and life-cycle-manageemnt.
Some observers suggest LG may be ahead, but that seems to be an evidence-free assertion. It is possible that LG has some huge unknown advantage but I doubt it. Still, LG has some major players including GM, Hyundai and Renault.
FWIW, Nissan joined with NEC to produce batteries for the Leaf.
Automotive Energy Supply Corporation
Nissan has explored selling their participation including to LG or Panasonic. Crucially, LG is the supplier for Renault for their entire range of BEV's. Quite obviously AESC has not exactly been a stellar innovator in BMS and automotive li-ion, despite their early lead with the Leaf.
Again, from the TSLA investor perspective it will be critically important to monitor energy storage advances from wherever they come. We may be assured that Bosch, Siemens, SAFT and others are not giving up without a fight. Neither will LG, a current dominant player, nor NEC. We clearly need to understand this industry if we are to honestly evaluate Tesla's lead or lack thereof.