I don’t see that they HAVE to!
A favourite aunt of mine (80s with dementia) was refusing food and drink during the umpteenth UTI. I was asked by care home staff whether we wanted her taken to hospital for ABs and fluids in drips, - otherwise she would very likely, very soon, die.
I could only ask the GP what he’d do if it were his much loved aunt. He said he’d leave her where she was, where they’d keep her comfortable. The situation was only going to arise again, probably very soon, since she’d always been prone to UTIs.
It ws a horrible decision to have to take, but I knew it was almost certainly what my aunt’s former self would have wanted.
Plus there’s the fact that hospital is in any case a terrible place for anyone with dementia, when they can’t understand what is going on or why, and are endlessly e.g. trying to pull drips out and/or dressings off.
My aunt continued to refuse food and drink. I sat with her a lot during that last week, she was apparently asleep and unresponsive nearly all the time, and she drifted away quite peacefully. The care home staff were wonderful, and did whatever they could to keep her comfortable - keeping her mouth moist, etc.
I would do exactly the same again, in similar circumstances.