It's even worse than that. If you stop taking it you'll rapidly lose your hair.
This is true for any hair loss treatment. A few years back I stopped taking minoxidil for a few months and I lost A LOT of hair. And I was still on everything else, minoxidil was the only thing I dropped. Thankfully I got back on it in time to get everything back.
Whatever you take to prevent hair loss, you need to keep using forever, or at least for as long as you want to have hair. If you take something (dutasteride, spiro, minoxidil, whatever) for a long time and stop, you'll rapidly lose a lot of hair. The hair loss doesn't just pick up where it left off. Let's say you're on a hair loss protocol for 10 years and then you stop. Over the next year or two you'll experience 10 years of hair loss because you'll lose all the hairs you saved by being on whatever it was. If I got off spironolactone now (after over a decade on the drug) I'd probably end up NW7 within a couple of years. Just like if I never got on it, i'd be NW7 by now.
It's sort of like with weight loss drugs like GLP-1s. People who stop taking them rapidly start gaining weight again.