The solution I’ve heard is you’re able to go to the elections office after mailing your ballot and void the mailed one and vote in person. Depending on the level of control/oversight may be not realistic for everyone, but again, at that point I’m more concerned about the human than the vote and were talking a whole other problem to solve.
I’ve had it happen to friends and I’m pretty sure it happened to me once but at least in my case I think I was collateral damage. That said, without really knowing the strategies of that sort of thing hitting the wrong target seems like something that would happen fairly often if you don’t care about other people which, presumably, you don’t.