I seem to recall this not being very effective, but I can’t find any studies right now either way. Lots of marketing, and a little bit of anecdotes, but no studies.
The idea being that they get used to it and just ignore it, because they want to bite their nails. At best it serves as a reminder when they do.