There are two aspects to how God sees us and our sins. One is legal and the other one is relational. The Holy Spirit may be grieved by our sins (relational) while still functioning as the seal of our redemption and therefore of our righteous standing before God (legal). This post deals with the legal aspect.
Romans includes the most thorough discussion on the subject of righteousness in the legal sense. For instance :
Romans 5:1 Therefore, having been justified by faith, we have peace with God through our Lord Jesus Christ,
2 through whom also we have access by faith into this grace in which we stand, and rejoice in hope of the glory of God.
Verse 2 mentions a grace "in which we stand". It is not a fleeting thing that depends on whether we have sinned recently or if we have repented from recent sins. The verse also defines what is our access into this "grace in which we stand", we access it by faith. So as long as I am in faith then I stand in grace. This is a fundamental legal quality of the new covenant.
The past, present and future tense of forgiveness of sins is a much debated topic but if we concentrate on the legal aspect, which relates citizenship in heaven and does not include being exempt from temporary judgments, then the following verse deals specifically with that :
Romans 4:7 “Blessed are those whose lawless deeds are forgiven,
And whose sins are covered;
8 Blessed is the man to whom the Lord shall not impute sin.”
Verse 7 can be interpreted as past tense only or as past and future tense. Verse 8 is however clear, it specifically includes the future tense, God will not impute sin in the future either. To whom ? To those who are righteous by faith like Abraham, that is the context of the surrounding chapter.
So sinning and failing to repent from that sin does not bring us out of a righteous standing by faith before God, in the legal sense. That is, if we still actually do believe. This is a very important point and is typically neglected by those who overemphasize the security of the believer. Faith isn't merely a mental alignment or an outward profession, it's a spiritual quality in the heart and our actions may affect it both in the positive and in the negative sense. When sin matures it gives birth to death as one scripture says. Harbor on sin or false doctrine for long or to a severe degree and it will eventually kill faith. How long it takes is guesswork. When someone says "maybe I'm living in sin but I do still believe" then the appropriate answer to that claim is "how do you know ?"