Welcome to the forum:)
My mother-in-law had schizophrenia and she developed vascular dementia. Vascular dementia affects the body internally, not just the brain function. I say this because what I write may not apply for your mom if she has a different kind of dementia.
She did stop eating for days at a time and would suddenly start eating again. As the dementia progressed she often just seemed to forget about eating. It was a bit of a mixed bag dealing with her from day to day. She could be startlingly different from one day to the next.
One of the first signs that made everyone realize something else was going on was she began to lose weight. She had gained a considerable amount of weight in her 50’s.
What kind of dementia does your mom have?