Important distinction here - a pAI's
directive, which is the "law" you can set for them, is different from a typical silicon law in the way that the pAI is, by its own actual law 1, free to dismiss it in its entirety if it conflicts with law 1. The pAI has only a single authoritative law at all times, and directives are meant to be supplementary to that law, not utterly binding like a traditional silicon law.
The pAI's one and only actual law which is enforceable by policy and admin intervention if disobeyed is "Serve your master." Any and all directives set afterwards are wholly at the mercy of this law, and if the pAI believes a given directive is in conflict with the law, the directive is ignored.
The master in this case is the owner of the DNA string permanently locked to the pAI when first bonding it - the only way to purge a locked master DNA string is by wiping the pAI and redownloading it. The pAI's primary function after being thusly bonded is, to the best of their ability and even potentially
against their master's wishes or direct orders in extreme circumstances, serve them. This is largely left up to the interpretation and (hopefully) good faith of the pAI player to do what they sincerely believe is in the best interests of their master.
An example: a pAI with a directive to help its clown master manage a clown shop suddenly notices that its master has begun silently walking towards an airlock and throws himself into space. Even though this
appears to be the self-destructive plan of its master and has nothing to do with the clown shop, the pAI can't serve a dead man, so it calls for help. Clown is shortly rescued from what turns out to be a hivemind-induced suicide by a diligent little pAI obeying its law.
All that being said, and to return to the OP - if the pAI is entirely aware of and present for the mind transfer of its master into a new body that would lose the attached DNA string, the ever-constant law 1
should still instruct the pAI to continue serving the new body, since the best way it can obey said law is by serving what it knows absolutely to be the new host of its master.
Much of this is left up to interpretation and the good faith play of the pAI player, which should really come with the territory. If someone is going to voluntarily sign up for a role whose function is to act as the sidekick of another person for potentially the duration of an entire round, looking for loopholes to escape that partnership is scummy and anyone doing so should be ahelped and probably shouted at for abusing what is already one of the most do-it-your-own-way ghost roles.
As to the pAI being staff of changed into something else, it's the same as a borg being changed into something else, laws go bye-bye. Only the truest of pAI mains would stick to their law 1 after that, and I only play Sybil so you'll never get me downloaded.
Edit because I apparently misread the OP and thought they meant xenobio mind transfer, not wizard mind swap:
If you leave your old body alive and that body is able to verify through a DNA check (a pAI function) with the pAI that it does still match the bonded DNA string, then you're out of luck and the pAI is obligated to continue serving your old body. A directive specifying otherwise would, as we've established, be dismissed in favor of law 1. If the pAI has been informed of your plan to swap ahead of time, and witnesses the transfer occur, then only a DNA sample check should override what it knew to be the master's intention. As only the pAI is able to request such a check, however, it really becomes up to the pAI itself at that point whether they want to force the issue or just go along with the new body.