They arrest you for saying that because it's considered "use of symbols of unconstitutional and terrorist organisations"[0] – you're absolutely free to demand a single state solution under Palestinian rule, you're just not allowed to promote Hamas and their slogan.
If the government can arbitrarily designate groups it doesn't like as terrorists and restrict your freedom based on that, then there isn't free speech.
Also, there is no free speech in Germany. There is freedom of opinion and expression thereof. I'm not an advocate of that, but it's also not arbitrary.
And I am glad we agree there is no free speech. "freedom of opinion and expression" without the freedom to speak may as well be a joke. And I wouldn't be surprised if they arrested people for doing interpretive dance in support of Palestinians.
You do know "freedom of speech" doesn't apply exclusively to the act of speaking, and "freedom of opinion, not freedom of speech" still includes the act of speaking your mind?
Also, the swastika predates the NSDAP by millennia. It's still not allowed to use it in a context where it means "death to all Jews". Same is true for the slogan "from the river to the sea".
[0] https://www.gesetze-im-internet.de/englisch_stgb/englisch_st...