There is no differentiation in this regard between the street, the school or any other place. Wherever there are non-mahram men, the woman is obliged to cover all of her body, including the face.
You have to try hard to convince your parents to let you study in a school that is not mixed, or a school in which you will be able to cover your face, or to study by distance learning, so that you can avoid falling into sin.
If your family do not let you do that, and they insist on your staying in this school, and you cannot move to another school, then you have to wear the niqab outside school, because that is what you can do. The fact that you are forced to uncover your face in the school does not make it permissible for you to do so outside of school, because Allah says (interpretation of the meaning): “So keep your duty to Allaah and fear Him as much as you can” [al-Taghaabun 64:16].
We ask Allah, may He be exalted, to increase you in knowledge and guidance, and to grant you a way out and relief.
And Allah knows best.