Intellectual property rights, ownership and use rights and partial use rights.
If you evaluate the patent as intangible assets and buy shares at a discount according to the evaluation value, then the intellectual property rights will be unconditionally owned by the company. Because you made an overall price for the ownership of your intellectual property, you got a reasonable consideration, which can be understood as that you sold the intellectual property to the company. The company acquired your property right at the price of shares and changed the patentee. You no longer have the right to this intellectual property. When the company is acquired, the evaluation price can also be included in the acquired company.
However, if you only cooperate with a company that has the right to use the technology, you get the corresponding shares or get paid, but you don't change the patentee, then the patent is still yours. What you cooperate with the company is the right to use technology, and the company only has the right to use it without ownership. When it is acquired, it cannot be used as an asset of the acquisition. The company can only cancel your shares, and the new company no longer has the right to use the patent.