You’d have to pay the NY tax. It doesn’t matter where you live, the money is still coming from the NY lottery.
Why not just buy it in New York and save yourself the hassle.
If you win this hypothetical lottery, you’d be wise to have a plane ticket to a country that has no extraition treaties with the u.s.
Win the lotto first, then worry about the rules of taxes.
You would have to claim your winnings in the state where you bought the ticket. If you live in NY, you would have to pay NY tax because it is a resident tax. It is possible that you can move to a state without state income tax before you claim your winnings, then when they pay you, you are living in a tax free state. I’m not really sure how this works, but if I won I would talk to a tax expert first.