God in his mercy, will forgive us when we repent of our sin. But it does not always mean, that there would not be negative consequences.
It is interesting to note, that even King David, the man after God’s heart, to whom God has always shown great mercy, had to endure the negative consequences of sin, when he decided to count the number of the Israelites, something, which was not pleasing to God.
God spoke to the prophet Gad and told Gad to give David three choices of punishment from God for Israel, because of the sin of David in 1 Chronicles 21:11, 12
Surely, David had repented and God had forgiven him, but why God still decided to punish Israel because of the sin of David?
We tend to think that because we live by grace, and are forgiven our sins, because of what Jesus did for us, therefore, there would not be any punishment from God for us, or bad consequences. But in the case of King David, that was not so.
God is still showing his kindness and his sternness to us Christians, even in the new testament, according to Romans 11:22.
Although King David repented, and was forgiven by God, it still caused thousands of people in Israel to perish.