I think my mom is ruining my child

I grew up in an asian household and my mom really fucked me up as a kid, said i was too fat and put me on a diet at 9, discuss about my body and shamed me in family gatherings. All that she say its is to make sure i turn out right. I never see it as a problem growing up just thought there’s something wrong with me but I was self aware of my body since I was 5 (i can still clearly remember being self conscious in my kindergarten shower as all my classmates are slimmer) she asked me to suck in my tummy since as young as i can remember because belly is ugly but now we live with her as my husband comes from a hoarder family and my house is way cleaner. Rent is through the roof here and we have no other choice than to stay with her while we wait 2 years for our new house. Problem is my child is growing up she’s 3 and is very close with her grandmother like how I am with her in the past. Right now whenever i give her food like cereals, chocolate and candy she will tell me its bad food don’t tell grandma she will get angry, or just straight up say no granny says its wrong. What have i done wrong? I’ve tried everything to prevent that and its not working. I wish i can move out but not in this economy and I think I failed as a mom.