This is a very hard situation.
My mum had a crisis and stayed with myself and brother for alternate fortnights until we found her somewhere suitable (sheltered extra care).
At the time my children were 8 and 12, and my brothers children were 7 and 5. My 12 year old was old enough to understand what was going on, although found it hard going, grandma couldn't understand why she wouldn't do jigsaws with grandma when she got in from school, when she needed to do her homework. Grandma also thought she was in charge still, even though dau normally came home on her own after school. She was constantly criticising my son's table manners, meal after meal. He has dyslexia and one of his issues has been poor fine motor control, so his cutlery handling was poor. Whilst he understood it was extremely hard for him and led to tears. On several occasions he would ask if her could have something or do something and we would say yes, my mum is deaf and would sharply pull him up for what he'd done. She thought she could override as as the most senior in the house.
In my brother's house she would play with the younger one, and if the older one walked into the room she would pack the toy up. She was still reading bedtime stories to them as this was what she'd always done but wouldn't have anything to do with the older one. This caused severe issues, the 7 year old wasn't quite old enough to understand. (the background was that on the recent occasions she had seen 7 year old he had been very poorly behaved).
Some of these things sound trivial but week after week they aren't. For both families knowing it was only 2 weeks at a time made it bearable. We hadn't fully understood at this stage that arguing with a PWD doesn't work so we tried explaining things to her to no avail.
Many dementia sufferers do not understand there is anything wrong with them - it is part of the illness so - I forget it's name. Therefore it is impossible to talk with them about it.
I think you need to talk to the children at their level. ie grandma's brain doesn't work properly anymore, she still loves you, but her behaviour is a bit funny sometimes. There are books suitable for their age group.
If your mum's behaviour is causing upset and hurt, you need to make sure the child involved doesn't see her for a few weeks, this might break the cycle. Protecting the grandchildren is really important to me.
In our case once grandma moved out and came to visit for a few hours things improved massively.