Then that becomes a matter for the people to decide through their representatives in the legislature or through public pressure. It is not the role of the courts.
If the people democratically decide to extort money (taxes) from individuals to promote religious doctrines which are abhorrent to them, that's simply 100% wrong, regardless of whether it's constitutional or not.