First, you mention something quite common. As we move into fellowship with our Father, then we do come into greater scrutiny and attack by the enemy.
Another point is that, as we enter into that intimacy, we simply become more aware of our sins. For those who have learned to deal with the more obvious sins, their growing intimacy brings more light into their life, and they become aware of other sins, hitherto not apparent to them. That is why David asked Jehovah to search him, not for God to see his sin, but so that He would reveal it to David.
However, I take it that you are referring to a sin that is common to you, and you, once again, succumb it. It is very common for us to have a "pet" sin, whether it is lust, lying, theft, anger, or any number of things.
Many people do not like to acknowledge the full spiritual nature of their problems. When we enter an area of sin, because it somehow satisfies us, as we continue to indulge ourselves, we tend to grow into that tendency. The saying "like attracts like" is very true; we generally think of it on a natural level, between people, but it also occurs on a spiritual level, our spirit attracting spirits of a like nature drawn toward that sin. The Word refers to Satan seeking whom he may devour, a demonic spirit looking to fulfill its own fascination with a sin.
To avoid our sin on a natural level, we would avoid those who would encourage in a shared area of sin. The same is true on a spiritual level. Scripture says to resist the devil, the demonic, and he will flee from you.
After getting close to your Father, and you feel that urge to sin returing, then you resist. How? First you understand the source of the temptation, those outside forces. You simply tell it that you belong to Another, and you have no part in them or that sin.
Another way to resist the devil is through communion with your Father. As you praise, listen to truly spiritual music, and meditate on spiritual things, then spiritual freedom and strength comes. Just like evil people feel uncomfortable in church, the demonic feels uncomfortable as you enter communion. As you practice this, strength comes.
A third way is offered by Joel 3:10, "Beat your plowshares into swords, and your pruning hooks into spears. Let the weak say, I am strong." Fighting urges to sin is a spiritual battle. When you give testimony to truth, "Let the weak say, I am strong," you draw on the power of your Father. Your strength is not in you, it is in Him. When you say you are strong, you are testifying to His power in you, not yours. This testimony brings strength to defeat the desire to sin.
This leads us to the promise of 1 John 1:9, "If we confess our sins, He is faithful and just to forgive us our sins, and to cleanse us from all unrighteousness." "Confess" in Greek is homologeo, meaning "to say the same." If we say the same thing that God says about our sin, not giving all sorts of excuses, then He promises to do two things, 1) forgive you, and 2) cleanse you, meaning the eradication of you familiar sin.
For example, look at your own confession about your sin: "I CAN'T break this sin"! You are not saying the same thing as your Father says: "I can do all things through Christ who strengthens me," Phil 4:13.
Start speaking in harmony with the Word of God, and He will start working in harmony with you. You will see the power of God unfold dramatically in your life. Tackle your sins one by one. You will see indeed, "If any be in Christ, he is a new creation: old things are passed away; behold, all things are become new," 2 Corinthians 5:17.
Who shall ascend into the hill of Jehovah? Who shall stand in His holy place? He who has clean hands (our deeds) and a pure heart (our mind).