Katie Dolatowski, 18, admitted sexual assault after grabbing the girl by her face and forcing her into a cubicle in Morrisons in Kirkcaldy before ordering her to remove her trousers.
She also told the girl, who managed to escape after punching Dolatowski in the face, that there was a man outside who would kill her mother.
Dolatowski also tried to film a 12-year-old in the toilet of Asda Halbeath, Dunfermline, last February.
Dolatowski was given a community sentence and tagging order at Kirkcaldy Sheriff Court last week and was released from Polmont Young Offenders Institution into supported accommodation.
She is not allowed contact with children as part of her sentence.
A spokeswoman for Women and Girls in Scotland said the case highlighted the importance of single-sex spaces.
The spokeswoman told The Times newspaper: “Over 90 per cent of sexual crimes are committed by males.
“It is extremely concerning that in this climate many female-only spaces can be accessed by males if they simply state they are transgender.
“This horrific sexual assault of a child is a reminder that sexual predators will take advantage of any access they can get and we should be doing all we can to minimise the risks of such assaults.”
The mother of the 10-year-old girl said she felt “very, very let down” by the sentence imposed on Dolatowski.
She told The Courier: “I don’t have any confidence that he will not do something equally as bad or worse.”
The Scottish Government is currently reviewing the 2004 Gender Recognition Act and has consulted on whether individuals should be able to self-declare their gender without the need for medical evidence.
At present, a Gender Recognition Certificate is needed if an acquired gender is to be legally recognised in the UK.
Supporters of the change - around 60 per cent of those who responded to a consultation, say that the existing gender recognition process takes too long, is too difficult or too expensive and needs to present less of a barrier.
It is also claimed the existing process is demeaning, intrusive and distressing for applicants
Opponents to self-declaration claim it may pose a risk to women’s safety in spaces including toilets, changing rooms, hospital wards and refuges.
It has also been claimed that the proposed self-declaration system may be open to abuse, exploitation or false declarations.