So you do your best but...
Childhood obesity is a real problem so as a responsible parent you restrict your child's access to sweeties etc. But no! - this actually has the effect of making them fatter. That's one of the startling comments in this (free) review. I haven't read the original papers yet but I need to - I think reviews can be really misleading unless you read the primary sources.
But taking the finding at face value, why does it happen? Not certain, of course. On one hypothesis, perhaps because the restrictive parents are not so much restrictive as downright authoritarian: so the children (4 - 7 year olds incidentally) stuff their mouths every time the parents aren't there.
This suggests a better strategy to explore is limited access - teach the child to make the decision. (But if this is true for food, what about alcohol? And cannabis? And... The mind begins to boggle.)
The other interesting nugget it that even 4-year olds eat less sweet food when they know their parents are watching than when they think they are unobserved.