The objection to those anti-Christian paintings or “artworks” in New York was not that the artists had no right to do them, but that they were being exhibited in spaces or at exhibitions paid for with public funds.
Yes you're right, and thanks for reminding me.
However, the "free speech" argument was the one the other side made, and succeeded with, both in the court of public opinion and in actual court, as I recall.