Not necessarily. It depends on how the contract between you and the company is signed.
Intellectual property rights include ownership, use rights and partial use rights.
If you evaluate the patent as an intangible asset and buy shares at a discount based on the evaluated value, then the intellectual property rights will unconditionally belong to the company. Because the ownership of your intellectual property rights is valued as a whole, you have obtained a reasonable consideration, which can be understood as You sold the intellectual property to the company. The company used shares as consideration to obtain your property rights and changed the patentee. You no longer have rights to the intellectual property. When the company is merged, it can also be evaluated and valued Be included in the merger and acquisition company and obtain the corresponding consideration.
But if you only cooperate with the company with the right to use the technology, you obtain the corresponding shares or receive compensation, but do not change the patentee, then The patent right is still yours. You use the right to use it to cooperate with the company. The company only has the right to use it but not ownership. When it is acquired, it cannot be used as an asset for mergers and acquisitions. The company can only cancel your shares, and the new company cannot There is also the right to use the patent.