I don’t think wishing for someone’s death is as big a deal as @Max_S does, but I can’t agree with that. Wishes are the first step in achieving goals. Wishing for something means that, if the opportunity arises with sufficiently low difficulty, risk, and consequences, you will be more likely to achieve that goal. Your pie example is perfect. Someone who wishes to eat a piece of pie will be more likely to take a piece if one is available.
I’d say the main reason that wishing for death is not so bad is that the opportunities to achieve it without downsides is quite rare. Still, I do think it’s useful to recognize that you are wishing for something that is wrong. It may not matter 99.999% of the time, but that one 0.001% chance, it would be good if there is some feeling you shouldn’t do it. Especially because those times are usually going to involve being extremely angry, and thus you won’t be thinking logically. Wishing death on people is just not a good habit to get into.
There’s a reason why such wishes are considered unseemly to state out loud. While the vast, vast majority of the time those wishes will never become reality, they definitely can. (And even if you aren’t the killer, you’ve just made yourself a suspect.)
That said, I do not think that all deaths are equal, and thus not all wishes for death are equal. I understand the desire for antivaxxers to die of the disease they refuse to acknowledge. You just would wish to have it happen at home, not wasting any additional medical resources, and not infecting anyone else. You’re wishing for something you cannot directly cause, and the wish mitigates the harm.
There’s just this inherent desire for justice of those who are causing all of these deaths. I don’t think anyone can look at those people who died who were virulently antivax/antimask and not feel some schadenfreude. We want to live in a world where the consequences for selfish, evil actions result in consequences for the person who perpetrates them.