The bible doesn't mention anything about public restrooms, but it does speak of purity, modesty, and decency.
Purity in thought is not thinking evilly. When men enter public restrooms open to all, some of those men won't be there because they think they are women, they will be there to foster impure thoughts, perhaps surreptitiously taking photos, or attacking women or girls.
In 2015 a man used his cell phone to take pictures of a woman in a Marshalls store in Oklahoma. He was taking pictures up her dress by sneaking a smart phone under it, as she leaned over to look at an item. Obviously, this wasn't in a restroom, but allowing men to use restrooms with females gives them leeway to take pictures and do even more harm.
At a Walmart, in 2015, in Henrico County, Virginia a man was caught taking photographs aimed up women's skirts. The husband of one victim trailed the picture snapper and saw him pulling the impure trick on another woman. The husband snapped a pic of his own capturing the man in this indecent action.
Again, if men that give in to lustful picture taking are stalking women, what an advantage a man of lewd intent or violent inclination has, when he can waltz into restrooms with females.
That they will take advantage of this opportunity has already been proven. See article link below.
The Bible addresses purity of heart. "Blessed are the pure in heart for they shall see God." (Mathew 5:8)
This phrase means keeping your life free from sin and keeping your thoughts chaste. Attacking women and girls and taking vulgar pics of them reveals a heart of evil intention.
"O Jerusalem, wash your heart from wickedness, that you may be saved. How long shall your evil thoughts lodge within you?" Jeremiah 4:14
This quote from Jeremiah points out that evil starts in the thoughts and that the heart must be cleaned.
Jewishencyclopedia.com refers to the heart as"the seat of the emotional and intellectual life."
It also quotes Proverbs 4:23. "Keep thy heart with all diligence; for out of it are the issues of life" (Prov. iv. 23). It explains that this is a reference to moral, physical, and spiritual life.
When a heart is keep pure modesty will be one of its attributes. What is modesty? A definition of modesty by the Cambridge Dictionary: correct or socially acceptable behavior and clothes, representing traditional cultural values.
One hopes that it will not become socially accepted behavior to attack females in public restrooms. So, why give would be attackers an advantage? But the correct behavior starts with modest thoughts ie: purity of heart.
The Catechism of the Catholic Church explains modesty below. Note how it connects purity and chastity to modesty. Note too that it mentions how we look at each other, how we behave towards each other, and it mentions the dignity of people.
2521. Purity requires modesty,
an integral part of temperance. Modesty protects the intimate center
of the person. It means refusing to unveil what should remain hidden.
It is ordered to chastity to whose sensitivity it bears witness. It
guides how one looks at others and behaves toward them in conformity
with the dignity of persons and their solidarity.
How one looks at another person, thinks about another person should guided by respect for human dignity. This is not the case with people that take lewd pictures and attack females. Let us pray that more people will be guided by respect for human dignity and by God's words concerning purity, morality, decency, and modesty.