Judges 10
11 The LORD replied, “When the Egyptians, the Amorites, the Ammonites, the Philistines, 12 the Sidonians, the Amalekites and the Maonites
c] oppressed you and you cried to me for help, did I not save you from their hands? 13 But you have forsaken me and served other gods, so I will no longer save you. 14 Go and cry out to the gods you have chosen. Let them save you when you are in trouble!”
15 But the Israelites said to the LORD, “We have sinned. Do with us whatever you think best, but please rescue us now.” 16 Then they got rid of the foreign gods among them and served the LORD. And he could bear Israel’s misery no longer.
Simply…yes, God can change his mind. He was once going to destroy the Hebrews, but Moses pleaded to God and he changed his mind. God was going to bring terrible punishments on the people but Jeremiah (I think) said to God that it was too much and he changed his mind. God was going to destroy Nineveh but after they repented due to Jonah he changed his mind. God can change his mind if he so wills, he is God. A parent may not wish to buy his child a toy but if that child starts to behave well and do good in school he may change his mind. Jesus told the parable about the unjust judge who gave the widow a just judgment because she kept pestering him. God changes his mind.
But you have
forsaken me and served other gods,** so** I will no longer save you. 14 Go and cry out to the gods you have chosen. Let them save you when you are in trouble!"
What did they do after? They stopped serving the baals and other gods. So since they changed their minds God was free to change his, since they, after that point,
stopped serving the baals and other gods.
Freewill is the darndest thing
Also, if you read the passage carefully you can see that they had already cried out to God for help before they got rid of the idols.