They have disobeyed God through what they did. They made a covenant with the Canaanites, despite being told, You shall not.
They were guilty of keeping Canaanites around as slaves (indicating they had made a kind of covenant with the Canaanites). And they have disobeyed God through what they did not do. They failed to break down the Canaanites’ altars, like Beth-Shemesh and Beth-Anath.
Israel was not charged with failing to drive out the Canaanites. They are charged with unfaithfulness. They are charged with peaceful coexistence.
1
2 and you shall make no covenant with the inhabitants of this land; you shall break down their altars.’ But you have not obeyed my voice. What is this you have done?