Judges 1:19 - "So the Lord was with Judah. And they drove out the mountaineers, but they could not drive out the inhabitants of the lowland, because they had chariots of iron."
Why didn't Judah win, if God was with them?
Part of the answer is in Ex 23:29ff. God had more nuanced plans than just whole-sale conquest.
But there are also spiritual lessons...
God confounds his own people some times to get them to meditate on their sin and lack of faith. Consider Israel stymied by Goliath before David shows up. Or our current recession.
We ought to believe and rejoice that the Lord is with us, as we profess faith in Him. But we don't get cocky and presume victory just because of that. On this side of eternity there will always be times when the bad guys win.
God uses technology (iron chariots) as part of his plan to test the faithful who are stymied by it, to judge the wicked for having it and trusting it, or to bless the faithful by having it and using it faithfully.
Israel was not being fully faithful as they began conquering the land, either. Judges 2:1-4.
These aren't black and white categories, where you are either perfectly faithful and completely and successful militarily or rebellious and annihilated by God militarily. God's people are usually in between, hopefully faithful and making progress against their own sin and the darkness around them.