I remember when I was treated for a bacterial infection a few years ago which I caught in Africa. My tropical med doctor (who was a pioneer in her field) would not prescribe just one antibiotic, she always doubled them up. She said that “one of the antibiotics will open up the cell wall of the bacteria, and the other antibiotic will destroy it.” So, she always gave me two to take at a time because bacteria sometimes has a layer of protection that needs to be taken away before it becomes vulnerable.
Maybe for you it was the same with the fungus: the sugar made it open up to eat and caused it to be vulnerable and then , because you were taking antifungals at the same time, they profited from this vulnerability and were able to attack the candida in its open state.
Just a theory.