https://globalnews.ca/news/8740001/quebec-academic-freedom-bill
It is often educationally valuable to cover material - and words - that are offensive. I have to do it on a regular basis when I teach cases on race and sex discrimination and other issues (e.g. - the notorious line in Buck v. Bell to the effect that "three generations of imbeciles are enough)."
That said, this is also breathtaking hypocrisy. The provincial government pushing this law is also known for having literal "language police" who punish people for the crime of posting English-language signs.
There is similar hypocrisy among many right-wingers in the US, who decry cancel culture, yet also advocate ridiculously overbroad anti-CRT laws and the like.
The issue of classroom speech by state-employed teachers and professors is admittedly a difficult one. Universities and schools have to impose SOME constraints on what educators can say, in order to ensure that they really are teaching the subjects they are paid to teach, as opposed to just pontificating about whatever they want.
If a teacher starts to lecture in defense of the designated hitter rule, the university administration can legitimately reprimand them. Not because the lecture would offend baseball traditionalists (though it would!), but because that's not the subject the teacher is supposed to be teaching. Ditto if they teach the right subject, but do so in a way that is clearly incompetent.
There is a fine line between such legitimate regulation, and ideologically motivated micromanagement that isn't always easy to navigate.