I do this all the time in California and have in other states as well.
If you are sure your state bans non-reloadable visa gift card purchases with cash I would love to find out what state to research what is going on there.
Did you park at the market? Oops, they read all license plates to build a marketing profile.[0][1]
See an ad online, and then later went into the store? Oops, Google picked up on that and told the retailer.[2]
Did you leave your face uncovered when you went into the market? Oops, they use facial recognition.[3]
[0] https://www.syracuse.com/news/2014/06/who_else_is_tracking_y...
[2] https://web.archive.org/web/20170523182250/https://www.washi...
[3] https://www.axios.com/2021/07/19/facial-recognition-retail-s...