My aunt had vascular dementia. She had a DNAR in place but it only specified not attempting CPR if she arrested.
She was being cared for by various people and always reacted with extreme violence and paranoia. She was 92 and doubly incontinent - screamed loudly, calling for the police, and hit, kicked and spat at her carers every time she was washed and had her pads and her nightdress changed.
Despite this, in the last two years of her life, she was given antibiotics for several UTIs and chest infections.
I argued that the DNAR (in my mind) meant that measures to treat infections should not be used - but the GP and carers did not agree. I recall one of them (a nun) telling me that because antibiotics were available, it was a dereliction of duty not to administer them.
I am sure that aunt would have died a long time before she actually did if she hadn't had so many courses of antibiotics given.