group of women

Non-mahram approaching a group of ladies

Q: If a female is among a group of other females and a non mahram male approaches the group of females to speak to the other females she is in the group with, is it enough for this particular female to lower her gaze and refrain from useless chatter with the male while still standing in the group or is she supposed to leave the gathering when the male approaches?