"If you live in a state that has state taxes, it doesn't matter if you win in another state, they will take their cut."
Just make sure that you're a resident of a state without an income tax by the time you have constructive receipt of the winnings. According to the IRS that can't happen until some time after you've presented the ticket and the lottery has verified that it is the winning ticket, giving you plenty of time to move. It's possible that individual states may have laws that address constructive receipt in a manner that claims it happens earlier, but if collecting the money isn't yet an absolute certainty then you don't have constructive receipt. Of course it's a safe bet that if the state you used to live in finds out you won they'll still try to claim that you owe them income tax. If that happens there's a pretty good chance that the resulting lawsuit will remove the anonymity you gained by buying in a different state.
And, of course, the downside to playing in a different state is that you have to claim any prize you win in that state. If you're going to be there anyway then for the vast majority of prizes it's just as easy as claiming at home, but how often will you be in that state? The reality is that you'll have to mail in the ticket or make a special trip and unless you win a major prize, you're not going to gain any anonymity because your own state isn't going to publicize the tiny little prize that you've got a realistic chance of winning.
If you were to win the 50k 3rd place PB prize or the 5k 3rd place MM prize there's a chance somebody would find your name on the lottery website, so let's include them. For PB the prize distribution means that selling the 292,201,338 necessary to expect one jackpot winner should result in about 346 prizes of 50k or more, and 11,616,626 prizes of $100 or less, the vast majority of which (10,668,443) will be $4 winners, not factoring in powerplay. 95.97% of tickets won't win a dime, and 99.997% of the few that are winners won't gain anything by buying out of state. The numbers aren't much different for MM. Saving cost of the stamp makes buying where you can easily claim a prize a far better bet than the incredibly small chance that claiming anonymously would matter.
Of course the lotteries aren't raking in billions of dollars every year because people are making logical decisions.