I think experiences vary greatly based on company and domain. I work on a team supporting features for an app that is used by tens of thousands of people every day. Yet, what we plan to produce at the beginning of the quarter rarely matches what we actually produce. Example: my team spent months working to integrate our app with a new data gateway service. We were, I dunno, 75% of the way there when executives decided the data gateway should not be used (this months after they said this same gateway was the future of the company). So, I'm not pretending when I say sometimes, I don't know my destination. Sometimes I think I know my destination, only to find that both my course and the destination have changed.
According to its inventor, Scrum™ was created to manage a team of dysfunctional COBOL programmers at a bank[1], not to find a Product/Market Fit (PM/F).
Instead of using an SDLC methodology here, use one of the relevant product frameworks for that, but needless to say, there is a large element of luck here, as finding a PM/F isn't guaranteed.
Usually you use low-tech SDLCs like Scrum/SAFe at the places that already have found PM/F, or those relying on violence (aka "taxation") as their main business model (e.g. military/government/public sector).
The only PM/F Scrum Inc found is how to make bazillions from useless certifications and training.
Yet I’ve seen agile/scrum ending up in exactly the situation you’ve described! It goes wrong more than it goes right and it’s about time the industry stops letting management dictate these “practices” to engineers.
If you started making a task-tracking app, and after all the work for scrum end up building a video game instead, something has gone terribly wrong.