undoubtedly the Sunnah is for the women’s rows to be behind the men, as was the case at the time of the Prophet (peace and blessings of Allaah be upon him). Al-Bukhaari (380) and Muslim (658) narrated from Anas ibn Maalik (may Allaah be pleased with him) that his grandmother Mulaykah invited the Messenger of Allaah (peace and blessings of Allaah be upon him) to a meal that she had made for him, and he ate some, then he said: “Get up and let me lead you in prayer.” Anas said: I went and got a reed mat of ours that had become blackened from long use, and sprinkled it with water. Then the Messenger of Allaah (peace and blessings of Allaah be upon him) stood, and the orphan and I stood behind him, and the old lady stood behind us, and the Messenger of Allaah (peace and blessings of Allaah be upon him) led us in praying two rak'ahs, then he left.
Al-Haafiz said in al-Fath: This hadeeth teaches us a number of things… that women should stand behind the men’s rows, and a woman should form a row on her own if no other woman is present. End quote.
But if what you describe happens