Is God holy because He doesn't sin? Or does God not sin because He is holy? It may just seem like pointless semantics, but the answer really does make a difference.
If God is holy because He doesn't sin, that implies that He has the ability to sin. He just doesn't do it because He wants to be holy. But this can't be true. Titus 1:2 tells us that God cannot lie. It doesn't say that He will not. It says he cannot.
In reality, God doesn't sin because He is holy. By His nature He is holy and therefore doesn't sin. Because of who He is, He doesn't sin.
That's how the relationship between holiness and sinlessness works. Sin and sinlessness are byproducts of who you are. They are byproducts of who you are in your relationship with God. This means that we should not be seeking sinlessness; we should be seeking holiness.
What I mean by this is that you shouldn't focus on avoiding sin. That is a stress-filled, unproductive life. Focus on Christ - perfect holiness in human form. We need to focus on building a fruitful relationship with Him. We need to focus on His truth, grace, and love.
Pursue Him. Pursue Him through prayer and His Word. If you keep your eye on that, eventually, the sinlessness will follow.
I'm not saying that at any point in this life will you achieve complete sinlessness. I'm saying that if you focus on holiness (your relationship with Christ) you will sin less. There is a direct correlation. And ultimately, God is not wanting us to be sinless, he is wanting us to be holy. He didn't take the Israelites out of Egypt just to be out of Egypt. The point of getting out of Egypt was to go to the Promised Land.
The point of getting out of sin is not just to be out of sin. The point is to restore our relationship with God. Don't beat yourself up if you start falling back. Just pick yourself up and focus on what's ahead.