> need to refund in full the purchase cost.
In practical terms, the logistics of many-years-later refunds would be unwieldy at best. Do the purchase records still exist? What if I no longer have that credit card or email address? How can you prove you're the heir of the deceased? What if I now live in a country where the "deletion" status is different? And how could you stop all the scammers who smelled free money?
Alternative: The gov't randomly picks 24 citizens from a pool of applicants who reasonably prove that they were harmed by the deletion. Those 24 are given legal authority to fiat-revoke all copyright protection on a "reasonable and proportional" number of the deleting corporation's currently copyrighted works. Or upstream of them, as "appropriate".
Doesn't matter. It should be up to the corporation to figure it out or else it's illegal and they get fined 300% of their total yearly revenue for each affected person.