I teach at our local secondary (DD left a year ago and DS is y7) and I found out very early on that when you bump into students outside of school, they're different creatures. In school, where they understand the rules, the hierarchy, the routine etc, they're relaxed and quite happy to squawk "wah gwan miss" at me across the corridor with a cheeky grin and a thumbs up. Bump into the same y11 in a Co-op petrol station and they blush and dive behind the display of premium engine oil. I think this translates across situations outside school. It's excruciating to navigate social mores without your friends who understand or an excuse of needing to get to class.
I make a point of trying to normalise these situations for the DC. If we see one of their peers, I make every effort to have a brief, friendly chat/joke/exchange, sometimes bringing my dc into the conversation and it models how to handle unexpected social interactions.
DD said it made school easier because students she didn't mix with at all, but we'd bumped into in Tesco for example, would then just nod to her in school or exchange pleasantries in the lunch queue.
It might, once upon a time, have been easier to leave DC at home, divide the family unit and they go off with friends exclusively, but their lives can be so insular anyway with the advent of social media and a rise in anxiety around social interaction beyond the screen that simply continuing to take them out as a family and face brief social interactions with peers with a brief chat or a wave meant that they learned to navigate it for what it was rather than the fear of what it could be iyswim. They have plenty of time at home alone or with friends, but time with family is important too.
I have never, ever made them feel that slight nervousness about being seen isn't normal, don't draw attention to it, don't berate them, just go out and do stuff they enjoy and show them it's fine.
Happily, even when I want to go to Aldi on my own and wander in silence, teen DD likes to come along and chat. Last Saturday, she had a mate over and they both asked to come with me so they could look at crap in the middle aisle. I thought they'd peel off and meet me back at the car, but DD took the list and her mate pushed the trolley. They're both 16 and even waved cheerily to people they recognised from college.