Borussia Dortmund is known to be selling their best players in almost all the summer transfer windows and that is why Bayern Munich will continue to dominate the German Bundesliga for more seasons to come.
Jadon Sancho was sold last two summer before Erling Haaland was sold to Manchester City last summer and now Jude Bellingham has left for Real Madrid. I think the club's transfer strategy isn't concerned by the success of the team rather they're more concerned by how much they make as gains when they sell these players. They might also be lucky raise another great player before the end of next season and still sell him at the end of the season
If they were able to retain the good players, Bayern could not have been dominating the league for years. It takes a consistent team to have great success, it's only financially good to sell a player who can make money without using it to another team.
On the one hand, they are doing something quite logical, they always sell their players when they are at their most valuable and make a lot of money. But their chances of becoming champions are dwindling

Bayern munchen dominated the bundesliga so easily for so many years because they had no consistent competitors to do so. Dortmund might be able to win the bundesliga occasionally in 1 or 2 seasons if they keep their star players from being sold to other clubs and I agree with your opinion on that. Indeed, we cannot stop the business thinking of the Dortmund owner and maybe we can only criticize him, but it must be admitted that many star players have been born from Dortmund since the Lewandowski era to the most recent Haaland now.
The reality is sometimes not that simple. Being able to compete or not, of course, must be seen from a number of actual conditions, even if the players make a sizable contribution but must pay attention to other conditions.
This season is proof that conditions other than players have an effect because Bayern's conditions this season actually provide something different and are quite tense, especially when competition is held even until the match ends.
But it all comes back the same in the end, saying Dortmund can compete or not at the moment it seems with their conditions, they are only focused on second place and nothing else can really be done when Bayern really get back to their good form.