It is in this case. After Musk invested in them, they’ve incorporated separate for-profit companies to essentially profit from the IP of the non profit.
Congratulations, you’ve just described a corporate structure.
It honestly doesn’t matter what the tax statuses of either of the corporations are. If Musk had invested in OpenAI with the goal of making tons of money off their IP (as opposed to wanting to open source it) and then the board decided to just hand over all the IP to another corporation essentially for free, Musk would be just as validated in suing.