Well, it's a voluntary code. In fact, when this issue was studied by Monique Potvin Kent about seven years ago, the companies that had not signed the voluntary code did less advertising than those that had.
One of the primary reasons that the new code being introduced next year won't be effective is that there are huge loopholes in how they can advertise. The example I gave was Lucky Charms, which is probably one of the most egregious examples of ultra-processed food. It's sugar with food dyes pressed into appealing shapes. This particular product would be allowed to be directly advertised to children through spokespersons, cartoon characters, etc.
Although there are a few good elements in the guidelines, there are so many loopholes that they won't be effective.