We legislate morality all the time. Slightly less so these days, with the reduction of laws against things like same-sex marriage, miscegenation, and such, but what do you think laws against murder, theft, and fraud are?
"That's not legislating morality!" you say. "Those are there to prevent real harms, or damage to society!" Well, so are laws against hate speech. They cause real, measurable harm to the people they are targeted at. The damage they do to society you can see all around you right now.
Our laws and our morals have always been inextricably entangled.
It seems to me that people who make that argument just think that the things they say it about (like hate speech) shouldn't be considered immoral.
Well, no; because they haven't gotten together the political will to outlaw AfD itself as a Nazi party.
This doesn't show that banning the speech doesn't work; if anything, it shows that being overly tolerant of Nazis...lets the Nazis stay around.