You become perfected when you are born of God, why do you think Paul says,
The whole point of the death of Jesus Christ was not just to atone for sin once and for all, but also to bring an end to sin, and to perfect his people, since the blood of animals was never able to perfect, just only to atone for sins, and thus this prophecy was fulfilled in Jesus Christ,
And thus this is the reason why these verses exist,
The way the holy spirit causes a man to never sin again is by removing evil desires, which are the cause of sin, so if you had the desire to commit adultery, you will no longer have that desire, if you were a homosexual, you will no longer want to commit sins of homosexuality, and this truth is a fulfillment of this prophecy,
The heart is where the desires are, so by God removing your heart of flesh, he is removing your evil desires, and giving you a new heart, that has godly desires. How does he do this? By giving you his spirit, and not just any spirit, a new spirit, that was never given before, and that was because the blood of Jesus Christ had not yet been shed to bring forth this new spirit that brings forth perfection. And this prophecy then goes on to say, and "cause you to walk in my statutes, and ye shall keep my judgments", meaning you will obey God as a consequence of receiving this new holy spirit, and thus be perfected. When receiving holy spirit, this change is instant, hence why we even have an example when Saul has the holy spirit spring upon him,
Receiving holy spirit transforms you into a completely different person. If you are still sinning, you have not truly received holy spirit, hence,
The actual lie of the devil is that you can continue sinning and be right with God. Once you finally realize that you don't have holy spirit, then you ought to find out how you can truly attain him, and thus be freed from sin. No one that hasn't be baptized in holy spirit will be saved. So if you wish to attain salvation, you must work towards attaining this free gift.