Usually the respective clause just becomes legally void. This is different from you not accepting that clause. It doesn’t invalidate the license as such (even if the license would like that to happen).
If a sales contract says that, by the way, the seller now owns your first-born, then that clause is void because it’s illegal. It doesn’t however mean that the contract is void and that you have to return what you bought or have to reimburse the seller. It’s the sellers fault that they put an illegal clause into the contract.
It’s different from if the law would say that the whole type of contract is illegal.