My family and I live with my grandma because of her dementia but she has gotten into the habit of trying to scold and parent my 7 yr old daughter and she is not nice about it. Whenever it happens I tell her I've got it and not to worry about it but it keeps happening and it's upsetting my daughter. Especially since my grandma yells at her over the stupidest things like purposefully mispronouncing words or dancing.
Sad as it is, your living there to take care of GMa is not a suitable solution.
Having a young child in the home with a person with significant dementia can be problematic and concerning for some of the reasons you give. I don't know of anyway to stop grandmother's behavior and it could adversely effect the young child. I'd explore other options. Is there any other family member where your mom may go and live?