I suppose it’s going to depend on a number of factors.For anyone with dementia past the earlier stages, hospital can be a terrible place, since they probably won’t have a clue what is going on or why, and will be unable to remember instructions, or to leave cannulas/catheters/dressings alone. My poor old FiL in later stages was constantly pulling a catheter out.
By a certain age and stage of dementia I was very clear that there was to be no hospital for my mother, unless it was absolutely necessary, e.g. in the case of a 2nd broken hip. Her care home was very good and I trusted that when the time came, palliative care in familiar surroundings would be best, and we were all thankful that that turned out to be the case.