I have the same problem with dd1 who's 12yo.
With her, it comes from a lack of confidence with other children. She takes ages to warm to others her age, whereas her sister can be declaring undying love 5 minutes after meeting others-so she feels pushed out there.
I know exactly what you're saying. With dd1, it's along the lines of me saying as a quick comment "oh we were a little late because we got caught up on the way out."
Meaning it to be a quick comment before moving on, and dd1 will jump in with a long story on how dd2 went back to change her socks (and exactly why) then ds needed the toilet (including that he insisted on using the upstairs one) and then mum had found a hole in her tights and wanted to change them and that one happened two weeks ago too when we were going to watch X at the theatre...
So information that isn't really very interesting, is really stuff they don't need to know, and occasionally stuff that I don't want her to say.
Problem with dd1 is that it's two fold. Because she lacks confidence with other children, she won't go and play with them. So they're a good friend, asking her to come and play, at something she likes, and she'll still keep drifting back to join in with the adults, often multiple times, with the friend asking her to come and play each time. Eventually the friend gives up, and dd1 sees it as them not wanting her to play rather than them feeling rejected, so she comes back to the adults again...
There's also the issue which sometimes happens which is wanting to talk about something I don't want her to be present at. For example if I was asking a friend's help on ds/dd2's behaviour, or, as happened a couple of days ago, I was comforting someone whose friend had just committed suicide.
I have ways of dealing with it. Firstly, I will send her off on a job/give her something to do. She likes that, taking drinks orders is a good one. She doesn't know that's removing her from the situation.
I also will touch her gently and give a slight nod. That means wrap up the story now. I'll often tell her afterwards why I wanted that. She's getting better at that, I don't have to use that anything like as much as I did at one point.
Catching her eye and a brief shake of head means nothing more on the subject. Particularly useful if she's complaining about her siblings at length.
We also have a code: If I ask her to go and check what dd2/ds is doing, that is saying that the conversation is not for her ears. She'll complain later, and usually be back within quarter of an hour or so, but sometimes she goes and joins in with the others and enjoys it. I use that usually when it's something the other person wants to say but is obviously awkward in front of her.
Sometimes I will tell her very basically afterwards, if it's appropriate.