One way to do that is to establish a new organization, transfer any deals from any partners who want to cooperate to the new organization (no obstacle since all three parties - oldcorp, newcorp and partner - agree). Buy any relevant assets including branding and such from the old one (this would need to be at a fair market value, but you likely don't need many of them), spend all the money at the old company (most likely on salaries for the employees doing whatever the goals were), liquidate the old entity and move on.
Sounds like bait and switch to me.
I don't know of any non-profit which has a condition like that in their constitution. However, they do often have an "asset lock", which would require assets are sold at fair market value, not given away, profits are not distributed etc.
Seems to me, an "intellectual property asset lock" could be constructed along similar lines, if people really wanted to. It might be a bad idea, though, if the non-profit folds, or would benefit from being restructured. Something allowing contribution to Open Invention Network or similar might be better for the long term.
In this case people were supporting AI research. Well... it worked :) GPT-3 is likely to open the AI chapter in history books.
For another example: you support cancer research and they find a cure. You can't expect everything else (trials, approval process, manufacture, distribution) to work on a donation model as well. I mean, probably there are 15 year olds who'd seriously ask "why not", but leaving them aside - going commercial means you won.