He is not happy when he doesn't get it when he wants it. He is more sad than angry. I have tried changing topics. I keep water, juices, and gatorade for him. Is there another way to handle requests and demands when you know it is not good for them to have or do?
I'd also keep in mind that often people with dementia forget that they already said something and that's why they say it again. So, likely, he has forgotten the previous coffee and that's why he keeps asking. It's not that he's being persistent, he thinks it's first request for coffee. And, there's no way to make him remember that's it's the 6th requests, no matter how much you remind.
If you think it's more into the OCD realm, I'd discuss with his doctor. Sometimes, meds can help someone if they are overly anxious and hyperfocused on one thing.