If we confess our sins, he is faithful and just to forgive us our sins and to cleanse us from all unrighteousness. Important: this does not say that God only becomes gracious through your confession. He IS faithful and just. Confession opens your heart to what has long been standing.
In the New Covenant, forgiveness has already happened. Confession is not a prerequisite for forgiveness but the moment you receive what is already there. God does not change through your prayer. You do.
Righteousness stands. Cleansing stands. Your part: be honest and receive.