@I8toys
The reason I offered a drink was because I had a cup of coffee in my hand and they weren't looking in the slightest as if they were going to leave. You're right about mixed signals.
The thing is if I said I was busy they'd just come back with its okay leave us until you're finished.
Give me some stock phrases to use next time please.
You've got to be blunt with this type of entitled person. Knock at the door? Can you peep out and if it's them, don't answer. It was a delivery so you answered, ask to use the toilet? Hesitate. Look away. Be awkward. Say "sure, if its just the toilet because I'm working". Wandering around your home after? Break away from your desk say "Right, you done? Got to kick you out now, sorry, I'm working" and walk to the door, hold it open, smile and wave them goodbye.
If they turn up unanounced and DP isn't home and you don't feel like socialising, either:
Don't answer the door. You're not obligated to be available just because you're home, you're allowed to be busy and not want to stop what you're doing.
Or open the door say "Hi DP isn't here right now. You ok? It's not a good time, I'm in the middle of something. It's best if you text in future if you're planning to drop by" (which means you can tell them No, if you want to) and keep them on the doorstep. Don't invite them in, be awkward. They need to feel the awkwardness of the situation.
You can also invite in for a cuppa then kick them out after half hour when everyone has finished, just say "right I've got to get cracking now, lots to do, it's been lovely to see you" and walk to the door.
If they try to prolong leaving by using conversation, then give monosyllabic answers to questions or just hmmm, don't ask them any questions or comment on anything they say. If they start a long drawn out anecdote, interrupt before it gets going to say "sorry, I really do have to go or I'll be late to meet my (imaginary) friend, lovely to see you, take care".
Then when you do socialize with them make sure you show good interest in what their lives are, so they don't think you're being off with them in general and they'll start to understand it's them turning up unannounced for visiting that's the problem.
Don't feel bad about any of this, they're being CF assuming you're always there to entertain them and making hints about lunch is just
.