I honestly see the Spore Drive being discarded due to medical and ethical considerations long before we hit the end of the series.
Problem is not-so-ethical species would still hear rumors about it and do anything to try and catch up on the tech. Nuclear bombs have been around since 45 and even though no one actively hurling them at each other and the entry fee into the club is high, countries still try to obtain them.
That puts it into the same problem as the genesis device. Another incredible weapon that even 70 or 80 years later, no one was able to reproduce.
Borg closing in on sector 001. Starfleet: "Okay, to hell with ethics, let's dust off a Genesis torpedo"
Captain Picard, "You wanted to frighten us. We're frightened. You wanted to show us that we were inadequate. For the moment... I grant that. You wanted me to say, 'I need you'? Fuck you, Q, I got a motherfucking Spore Drive!"
Dominion War: "Klingons and Romulans are saying if we don't start using Genesis torpedoes they'll make their own." "Could we just ask the Organians to make it all stop again?" "No!"
Capt. Janeway: "I'm afraid it's going to take us many many painful and dangerous decades to return to our own quadrant. We could of course just modify the ship to make a single spore jump. That tech is what.. 80 years old? But it would not be prudent. And I am only going to do prudent things to get us home. What are you all doing? put those phasers down. Now!"
There are ways to at least get out of this one, kill off the mycellium network, or have some Handy NonCorporeal Entities decide no one can use it anymore for a few million years. But I hope they dont just put it in the Vault of Incredible Inventions We Can't Use Anymore.
David Marcus "I'm sorry sir, Genesis doesn't work."
Captain Kirk, "You mean you used protomatter and it will always unravel the matrix in a violent explosion?"
David Marcus "No, I used blueberry flavored protomatter, and it will always unravel the matrix AND I used all of it in the universe and no one can ever make a genesis torpedo again, ever. If I just had a beaker of red matter I could have fixed all this. Arrrhgh!"
Captain Kirk, "Klingon bastards you retconned my son!"