Eating sugar creates a cascade of hormonal knock-on effects that can make you fat.
I beg of you (especially if you're struggling with your weight!) to consider the alternatives to Calories-In/Calories-Out eating.
My dad is a doctor, he's _convinced_ it's all CICO (which is what was taught to physicians in the 70s, and today), he struggles with his weight, constantly, and is super unhealthy. He eats low-fat everything, and is in miserable physical shape.
He's blind to alternatives. It is unbecoming of a man of science to be so tied to a possibly-incorrect view of such an important topic.
Consider: https://josh.works/notes-gary-taubes-case-against-sugar