That’s a questionable headline considering it was police interpreting an existing law (no courts or legislator has weighed in on the incident in the article). Read a better source here: https://www.aljazeera.com/news/2023/11/10/germany-gaza-protests-crackdown
police interpreting an existing law
That’s what the police does. They enforce the law as they understand it.
You’re right that it hasn’t been tested in court, but that only happens when someone challenges it in court.
It’s also important to note that Germany does not have absolute free speech, there are several anti-hate-speech and anti-nazi laws that limit that right, and the police can and does enforce that frequently.