No God never leaves us, ever.
We however frequently leave God, usually by sin, or for the person who has arrived at the time of life where the more obvious sins have been mostly conquered, through laziness, or false business that puts other concerns ahead of God.
God does however perfect the soul by leading her through darkness, a natural and necessary process of maturation and growth. Fr. Groeschels Spiritual Passages and Journey Toward God are two best first books on the topic of exactly what their titles suggest, and answer OP’s questions.