If you go to the store, there are Star Wars characters on Coke cans and merch all over the place for the various D+ shows when they debut. They 100% do drive merch and such, or at least create licensing deals. Disney has thus found a way to pump out lots of Star Wars in the last 6 years. We also have a Mando movie coming next year, stemming from those D+ shows.
We can argue about whether or not the shows have hurt the brand from a brand perception and quality standpoint. But the one thing they do accomplish still is making the company money off merch and licensing deals. Coke didn't get the new Star Wars cans they're putting out for free. They paid Disney for that. That's why they haven't abandoned making the shows.
If Disney wanted to freeze Star Wars a a business strategy, they wouldn't have cancelled movies case by case. They would have cancelled everything at once and refocused the brand meticulously. That's not what they did. They cancelled each one mid development cause of some issue with the project in question. And then kept the D+ content flowing to keep the Star Wars ecosystem flowing. Marvel also isn't stopping D+ content either. They're just switching focus to other characters or animation to fuel that same ecosystem. You will never see Disney just freeze either brand entirely, and that's all based on licensing deals. DC or other franchises has little to nothing to do with the broader strategy