The state sanctions harassment all the time:
* It harasses me about taxes every year as I constantly mess things up...
* It should definitely harass you if you break the law!
These laws in question "harass" (restrict) one population by disabling harassment perpetrated by another population.
For the sex-education ban it "harasses" (restricts) sex education to prevent teachers from "harassing" elementary aged children about sexual identity in schools. An abortion ban "harasses" mothers by restricting them from "harassing" their babies.
We're talking about a culture that values the one group's rights over the others' rights. Who wins depends on the prevailing culture in our system of government but one group will necessarily win at the others' expense.