Secondly, you must abide by the rules of the school, so you can only cut it. If you don't cut it, the school has the right to punish you according to discipline, or even expel you. Don't think about which law the school broke, even if the school goes to court.
For example, as we all know, before the amendment of the Marriage Law a few years ago, universities had the right to expel students according to the school rules. At that time, there were indeed several famous lawsuits (which should be found online), all of which ended in students losing. Even if the students meet the requirements of the marriage law, there is no law saying that the school rules are illegal, so the students are still expelled. This situation was not changed until the marriage law was revised a few years ago, which clearly stipulated that students also have the right to marry.
Similarly, there is no law that it is illegal for schools to let you cut your hair, so it is legal. Don't consider human rights, because those things are the most insecure. This is also the lack of our current legal system.
Therefore, legally or legally, you can only get a haircut.