It’s very common for beginners when they are learning to pass the guard to reset back to square one every time they encounter an obstacle. It’s all or nothing. More advanced players understand how to advance incrementally and hold each new position.
Nic Gregoriades explains this idea. He likens it to climbing a ladder. It revolves around segmenting your opponent’s body into small obstacles to overcome, and then maintaining each new position.
Incrementing your way forward was a huge revelation for me. Roy Dean has always preached the concept of applying overlapping pressures, so that you can improve your position without risking losing the ground you’ve made. That concept applies not just to guard passing, but to any position where you need to advance.