“So the anger of Yahweh was kindled against Israel. He said. ‘Because this people have transgressed my covenant that I commanded their ancestors, and have not obeyed my voice, I will no longer drive out before them any of the nations that Joshua left when he died.’ In order to test Israel, whether or not they would take care to walk in the way of Yahweh as their ancestors did, Yahweh had left those nations, not driving them out at once, and had not handed them over to Joshua.”
This was a test that the Israelites failed. The Israelites have transgressed the covenant. They have not followed Yahweh command. Those other nations are now there to test the Israelites. Anybody left by Joshua would still be there. Yahweh was no longer driving those other people out.