If students look at their teachers sexually, that's on them. Women who are dressed "modestly" get sexualized every single day. Of course, teachers shouldn't dress as if they are going to a nightclub, but women and girls are not responsible for male reactions to the fact that they have bodies.
According to Dr. Conrad Manning in his paper Virtues of Nakedness: Physical & Psychological Health, “Sociological studies of ethnic groups in which nudity is common have demonstrated that there is no cause and effect relationship between being naked and immorality. Social nudists also exhibit this lack of association. Still, it is clear that many people perceive an association between nudity and overt sexuality. From the standpoint of scientific psychology it can be demonstrated that this connotation of nudity is no more than a learned sexual fetish. It is not an innate [human] characteristic.” (emphasis mine)