There are many situations to be distinguished:
If a domestic enterprise is transferred by an individual to a foreign country and no record is filed, the contract will not take effect.
If you are not a domestic enterprise and an individual transfers to a foreign country, the contract will take effect from the establishment:
The contract taking effect and the patent right transfer taking effect are two different things. Because the unregistered patent is still in the hands of the original right holder; but the contract is still valid even if it is not registered.
If both parties have no objections, just make additional filings; if the other party has objections, go to the court to ask the other party to confirm that the contract is valid, and then wait until the court decides in favor and ask the court to issue a notice of assistance in enforcement to the Patent Office.