Holiness will not produce relationship with God, nor will a lack of holiness make God turn away from us. He deals with us according to our faith in Jesus, not our performance.
Holiness will keep Satan from stealing our faith, while a lack of holiness is an open invitation for the devil to do his worst. A person who wants to endure to the end cannot live a lifestyle that permits Satan free access to him.
Although God is not holding our sins against us, we cannot afford to sin because it allows Satan to have access to us.
When a Christian does sin, and allows the devil an opportunity to produce death in his life, the way to stop this is to confess the sin. God is faithful and just to take the forgiveness that is already present in our born-again spirit and release it in our flesh; removing Satan and his strongholds.
Holiness is a fruit of salvation. Holiness is a by-product of relationship with God; it does not produce relationship with God. It is the nature of a Christian to walk in the light, not in the dark.
When we are rightly informed of who we are and what we have in Christ, then holiness will naturally flow out of us because it is our nature.