If the contract is void from the outset, its clauses carry zero force, surely.
My original post was probably not very well worded. A contract that arises from illegality is void ab ignitio, such as an unwritten employment contract where the employee is paid cash in hand. I’m 99% certain that is not an enforceable contract, irrespective of whatever boiler plate clauses are inserted. I’m pretty sure the same applies in relation to contracts that are formed via fraud. Any other position would surely be untenable for public policy reasons.
I’m no expert in contract law btw, so happy to be pointed in the right direction if I’m wrong and I’m certainly not saying this ‘contract’ is or isn’t illegal!