Ive lost almost 20 pounds due to candida(170down to 150). Candida causes a weak intestinal lining which makes your diet more limited/reduces your appetite. Limiting carbs on the diet eliminates cravings-therefore you dont eat as much. Candida can also interefere with digestion=bloating/fermentation etcc. This reduces your transit time=feeling of being full longer. Lack of friendly bacteria can cause constipation/less beneficial acids/enzymes for digestion. Candidas toxins+certain anti-fungals can aggravate your gut reducing your appetite.
Usually people that gain weight are eating the sugars/simple carbs---straying away from the diet due to cravings. But eventually the bloating will settle in leading them back to the restrictive diet. An exception might be a overactive thyroid.