So much this.
1. In today's age, a player performing at a high level at your club is worth much more than two expensive players from a different team. Because, no matter the transfer price, there is no guarantee that a player would actually emulate the level they showed at their previous club. So it always makes sense to increase their salary to keep them than try to find a ready made replacement outside, where you'd be paying a big fee plus similar wages.
As mentioned in the other posts,
1. Barca were absolutely rinsed for Dembele and Coutinho fees after they lost Neymar. Neither of whom have provided half of Neymar's output.
2. Napoli fleeced Juve in the Higuain for almost the entire fee they got for Pogba. Higuain was great in the years of Rafa and Sarri at Napoli and he never came close to reaching that level at Juve.
3. Real tried to replace Cristiano with Mariano Diaz
While United also replaced Ronaldo poorly, at least they got good service out of Valencia and Owen!
2. Of course, keeping hold of players by paying them crazy salaries doesn't always work out great either, since you have no guarantee they will keep up their high levels in the future or not suffer a serious injury. DeGea being a good example of this. Rewarded with an big contract after 4 years of top class performances, and then he promptly dropped the ball.
So a team should ideally not have any lynchpins and have a upcoming player ready to replace them over a season or two. Liverpool having AOC and Mane ready to share Coutinho's duties after he left being a great example. Dortmund replacing Dembele with Pulisic and Pulisic with Sancho being another good example. Leicester also did well after losing Maguire I think? So looks like a trend, where smaller clubs who are always prepared to lose their stars and have their replacements ready, do much better than big times. Obviously not an apples to apples comparison, since the replacements for key players at the big teams are much more rare.