You're a resident here if the UK doesn't consider you one because you have to be one somewhere it would seem to me.
Anyway, you're a citizen so they can't deny you entry. Rudeness aside (which is by the way why I have Nexus, because I can't keep my mouth shut when I get an agent that is rude like that and don't really have the time to challenge them then complain), just go along with what you were doing, and watch out for that agent again. Is that the woman in her mid to late fifties with brown hair? I had an agent of that description who was unbelievably abrupt and rude once when traveling with my family.
They're getting Nexus next month.
If the next agent gives you a hassle again then maybe change the approach.