Sayyidi wa sanadi Mufti Mohammed Taqi Usmani (Allah protect & preserve him) instructed the attendees at a female burial,
‘The na–mehram should, please, step aside. This a Shariah ruling. ‘
This was in addition to veiling of the grave from all the sides with makeshift curtains.
Darul Uloom Karachi, Old Graveyard, Saturday 2 November 2019. After zohar.