This provision would be an unconstitution infringment on freedom of association and would violate the equal protection clause by discriminating on the basis of religion. It would be a blatently unconstitutional law and California knows this yet they are trying to bully the scouts with the high costs of litigating the issue to victory.
If the state can tax the Boy Scouts or churches, they can destroy them. That's the rationale the Obama administration is following in going after Hobby Lobby and anyone else who opposes their agenda.