I'd say both are important.
Stopping and working slow is the only way you'll find and improve hard things. If you just blunder past them each time, you're only learning to blunder. Able to play the easy things but never improving the hard.
But if all you do is stop at every mistake, all you're learning is how to stop at every mistake. Live music doesn't stop, you need to know how to pick up and keep up, no matter what. (This was my mistake for decades.)
There's a lot more to learning a piece of music, but I think both kinds of passes are necessary. Well, unless you're good enough to fly through that piece prima vista with results that you're happy with. Then you get to hone the expression or interpretation or just cash in, I guess.