As a parent, I think everyone does that, but it can't be done forever because they will also know it themselves from the outside environment or from their friends.
I myself see that in my environment, parents don't gamble much, maybe it can be said that only a small number of parents gamble. However, when looking at the age of teenagers, almost all of them gamble. So is this because they see their parents gambling? Of course not, but they know gambling from the outside environment or from friends who already know gambling.
Well, children can actually learn from anywhere, from anyone and from anything they see, they don't only get exposed to gambling from their parents but as a parent that is already aware of all this risk, they need to keep their children in check all the time, they need to establish a good relationship with their kids so that those kids can easily and freely share their interest about something, perhaps something that they learned newly outside home. As a parent too, you should know the kind of environmental that is good to raise your kids and the places or school you take your kids to.