Company employees get invention patents during their work, and the intellectual property rights belong to the company. If you leave the company only for cooperation, the patent should still belong to you.
You can protect your legitimate rights and interests through legal channels.