Why Madrid successfully manages to sell most of their players, while we get screwed over has mostly 3 main reasons.
1. System players.
We have many players ideal for our system, especially the kids coming from La-Masia. But many clubs look for different strengths and skillsets.
2. We're broke
Every agent and their dog know, Barca is broke and can't afford to sit on players. The logical consequence is, nobody is offering us a good market price. Madrid on the other hand has the luxury to refuse transfers, if they don't like the fee, so they get bigger offers naturally.
3. We reward players too fast and sit on them for too long
The club gives out too big of contracts (or at least did) too fast. Best example for too fast was Fati. He was mostly hype when he received a star player contract. And we also give out too long contracts for players over 30 years old. We can only hope MAtS was the last one. Club de Amigos is a direct result of this bad policy. If a player reaches 30 years, we should offer a maximum of 2-3 years performance dependent contract and go from there. Lose the fear of losing 30 year old players, if they don't like it. Ter Stegen is on a 20m/y contract until 36. You wouldn't see this anywhere in a decently lead club.
I know part of the reason is, that he extended the contract to give the club ffp margin. But now it bites us in the ass again.