The issue is can God, who is immutable, repent of something?
The immutability of God means that He cannot change His essence. His existence is unalterable and He has no cause for Himself. He can never be better or worse than His essence.
This issue is anthropomorphic (characterizing God as man) or anthropopathic (characterizing God with man’s feelings). In other words, God’s repentance is from the viewpoint of man, how man looks at the issue.
God always has consistency with His attributes. When these changes appear, they do not appear in His essence, but in the execution of His essence. That is, if man repents from sin, then God will repent of judgment as in the case of Nineveh. God always acts consistently with His attributes when He see changes in man. God is always free to act according to His essence. Therefore, God is always at His best. No characteristic of God can ever change.
Genesis 6:6 says that the Lord was “sorry” that he “had made man on the earth, and He was grieved in His heart.”
The context is the Genesis flood. The words “repented,” “pain,” and “made” go back to chapters 3 and 5 (5:29). The reason pain was brought into the world is because of sin. “Repented” does not suggest that God changed His mind for He is changeless (Mal 3:6; He 13:8). The idea is more than God grieved because man sinned.
Jonah 3:10 https://versebyversecommentary.com/jonah/jonah-310/