My mother has enough capacity to decide whether to have toast or a banana (about all she eats these days.) That is real capacity 'in the moment' because it relates to something immediate/visible/tangible. If you asked if she realised the detrimental long term effect that eating just these 2 foodstuffs would have on her health, she wouldn't have a clue what you were talking about. If you asked her to name 3 other foods she would struggle and would probably forget the question before she could answer.
Asking people with dementia about big things with consequences like where they should live, is, for many, ridiculous and pointless, and social workers should not be allowed to judge capacity from an answer to such a question, unless... the person is also able to say where they live and would actually recognise the place (and be reassured that they are home, not equally confused as to where they are), they are aware enough of what they can and can't do to enable suitable help to be put into place.
As far as I am concerned, saying, 'I want to go home,' without any understanding of the implications of that, is not enough to determine that person has capacity.
Call me an old cynic, but as the usual choice of SS is to keep people at home as long as possible because it is cheaper, it really suits their purposes to use the 'I want to go home' ploy to justify their actions. Has any person with dementia ever said, 'Don't make me go home - I want to live in a care home so I'll be safe and looked after!' ? No, never.