That's not how its done here or in any non-Muslim countries that I know of.
We have a large Muslim community where I live near Detroit and Dearborn, so we get to see how it actually works in reality. Like with observant Jews, they must follow religious law but not if that law violates national, state, or local laws. If there's a conflict, then these cases go to local, state, or federal courts, which can then be reviewed through appeal.
No country that I know of is going to allow a religious groups to violate local, state, or national laws, and our history here is full of such cases historically, such as we saw with the issue of polygamy with the Mormons many decades ago. However, there are some cases whereas certain secular laws were overruled as being unconstitutional, thus ruling in favor of the religion/denomination.