I am a lawyer who practices in the area of wills and estate planning, as well as estate administration, and I have some thoughts about this (not legal advice, just legal musings):
1. A will cannot be used to claw back rights which you may have granted during your lifetime, and it cannot bind people to do things they haven't consented to do, except in certain scenarios where a will requests someone take a particular action before receiving a benefit from the deceased's estate, and even then, there are significant limits on that kind of clause (generally, courts look unfavourably on testators trying to exert undue control over the living from beyond the grave). In particular there are public policy reasons why you can't make a gift contingent on your child not entering into a mixed race relationship, or separating from their current spouse, things like that.
2. Because a will cannot claw back rights which you may have granted nor bind parties that aren't related to your estate (beneficiaries, debtors, creditors, intestate successors, etc)., you could not use a will to, for example, compel Meta not to use information, photos, or video you've uploaded to Facebook, to train AI models, so long as the use of that data was in accordance with Meta's terms of service which you agreed to when you were using Facebook. A will that said "Meta may not use my data to train AI models" would be about as enforceable as those BS "Copyright Notices" people post as status updates on Facebook that say you're not granting Facebook / Meta any rights over the data or photos you share on social media (ie - legalese nonsense with absolutely no force or effect).
3. A will could include a clause attempting to prevent a beneficiary or relative from making an AI doppelganger after death. You can compel your beneficiaries to do, or not do, certain things with your assets after you die, and a clause that says "my beneficiaries may not use my photos, videos, or other digital assets to create an AI doppelganger" would be enforceable on its face. However, what happens if a child of the deceased decides to upload all of the deceased's digital assets to some AI doppelganger-generator contrary to the wishes of the deceased? Presumably another beneficiary could bring a claim against that person, but what are the damages? No one has actually been harmed by this behaviour in a way where you could attach a monetary penalty and say "this behaviour cost this person X dollars or harm equivalent to X dollars and the court awards damages thusly". Without amending legislation to create some kind of statutory penalty, I don't think this would be enforceable in practice, even if it's enforceable in theory.