There are some examples of this like Novo Nordisk.
They operate as a wholly owned subsidiary of a nonprofit foundation[1] whose purpose is to encourage medical research.
If that is what non-profits in Pharma are supposed to be, what is the difference with for profits?