If the overpayment is due to fraud on the part of the recipient, that is a crime and needs to be treated as such.
If it’s a government screw up, then the government needs to suck it up. Simply correct the error and do not penalize the innocent party.
Except that is still other people’s money.
If your bank screwed up and deposited an extra grand into your account by mistake, do you think you should be allowed to keep it?
We’re talking other people’s money here.
Whether it’s your bank or the government screwing up.