Also an invalid clause. They don't get to decide what is valid or not, that's up to the judge.
I am not a lawyer, this isn't legal advice.
It's up to the judge to decide what is valid and not. The court has the power to decide on each clause individually and the contract as a whole.
It's the normal outcome that when one minor clause is deemed invalid, only that clause is dismissed, not the whole contract.
It doesn't costs anything to write it down to clarify. That's exactly why it's written in every standard contract. There could be a different jurisdiction somewhere one day that decides to invalidate entire contracts by default for any stupid reason, I don't know of one in the western countries but I suppose it's possible.
It is reasonably predictable for most situations how a judge would rule, which is why contracts have common boilerplate.
In the event that one part of the contract is nullified, it's up to the court to determine if that modification will nullify the contract or not, it depends on the circumstances.
The presence of the clause cannot prevent to cancel the contract, the absence of the clause doesn't mean that the contract is cancelled if any clause is found invalid.