Can my diet affect thrush in baby’s mouth

So I’ve been breastfeeding and baby has developed thrush in her mouth pretty bad. Doctor prescribed her antifungal liquid and I asked her if my diet could make any difference bc I struggle w candida overgrowth myself but have never committed to changing my diet enough to fix it. But the doctor said no. She said it just happens in Breast fed babies a lot and moms diet can’t help or make it worse but I can’t help but think that isn’t true.. and I read some articles online about reducing or cutting out sugar making a difference in baby’s thrush. So just wondering what you all think about it and maybe some of you have actually tried changing your diet while breast feeding and it make a difference?