I don’t think willpower comes into it. Sugar is a drug and a toxin that rewires your brain, so anytime the a hint of something sugary comes along your brain is defenceless.
I think the only way around it short term is to take yourself immediately away from the situation, let the sugar leave...