Actually, God does change His mind. He was going to wipe out the Israelites on several occasions but Moses talked him out of it. He negotiated with Lot. Just a few examples.
Don’t confuse MERCY with changing his mind.
The two examples you mention are of God delaying judgement and show his mercy.
Malachi 3:6 declares, I the LORD do not change. So you, O descendants of Jacob, are not destroyed. Similarly, James 1:17 tells us, Every good and perfect gift is from above, coming down from the Father of the heavenly lights, who does not change like shifting shadows. The meaning of Numbers 23:19 is clear: God is not a man, that He should lie, nor a son of man, that He should change His mind. Does He speak and then not act? Does He promise and not fulfill? No, God does not change His mind. These verses assert that God is unchanging and unchangeable.
So, God does not change his mind like a man, however, he is willing to show Mercy, and patience, which SOME may incorrectly think He has changed His mind, and countenances sin, or so on....