Panasonic has a relationship with TowerJazz who make and design their own sensors. I believe they are the ones who made the sensor for the Leica M240 and Leica SL.
Well, I'd say it's more that a "relationship". Panasonic owned the fabs outright (three of them I think) and did the design, process development and manufacturing of image sensors as well as many other semiconductor components for their businesses. However, in-house fab technology is increasingly expensive for companies that aren't primarily integrated circuit suppliers. It's also expensive for those who are; note he number of "fabless" semiconductor companies that arose especially from the 1990s. A major trend became the concentration of fab capacity in the hands of a few major semiconductor foundry operators: TSMC and UMC in Taiwan, TowerJazz collecting fabs around the world, Globalfoundries being formerly AMD's fabs.
The most sensible business model for a semiconductor fab is to operate as close to full capacity as possible; that cannot always happen if companies (like Panasonic) build fabs for their own needs but cannot keep them running at 100% capacity and efficiency. So, divesting a fab and then using it as a (typically privileged) customer allows the depreciation, operation and new-development costs to be borne by multiple customers. Fab operations are complex and difficult to manage in a cyclic business environment; best to be managed by a specialty operator (even if that staff is essentially the same as the former in-house fab operation.)
Panasonic made such a deal to move the fab business (of which image sensors was only a part) out of its core solely-owned manufacturing umbrella, creating a new company that is 51% owned as a TowerJazz foundry but retaining 49% so as not to be shut out of access to capacity and evolving technology decisions. It seems to be widely misunderstood on DPR (not by you but I'm speaking generally) that it is still essentially a Panasonic asset, not simply one of several possible sensor suppliers around the world that could serve Panasonic as well as Nikon, Olympus, Ricoh etc.
Having noted all of that, a reasonable question is then why did Panasonic, though still with such special access to its sensor fab, seem to go into a downturn of its in-house camera sensor development for the past decade or so? I would guess that the sensor design and product-engineering group(s) were reduced and at least partly re-assigned in the company-wide retrenchment after the big financial crisis. Sony continued their strong in-house development and decided to double-down on their image-sensor foundry business. But throughout that time, we've been seeing research papers about pixel well design, micro-prisms, organic thin-film layers etc. from the still-remaining Panasonic R&D group. These may be now coming to fruition in new and/or future generations of sensors. But I can also understand why they are sensitive about it. They need to retain the option of buying from or contracting engineering services from anyone, as camera companies do all the time for cameras, lenses and accessories. If they were to crow about an in-house design in one model but then revert to Sony or some other supplier for another (even for the most sensible of reasons) the messaging to our fellow brand-conscious gear enthusiasts could seem quite confusing or negative.
--
JoelH