There can be an immutable smart contract which is in compliance with the law (though you have to be more specific with which law, but for these purposes I know we mean US law).
Point being, immutability is not sufficient to demonstrate that a contract is in conflict with the law.
But it's impossible to prove that a smart contract (or any contract, for that matter) is in compliance with the law until it goes in front of a judge and all possible appeals have been exhausted, and that's what matters here.
Point being, immutability is not sufficient to demonstrate that a contract is in conflict with the law.