If everyone understood that the reason was that Real had a series of injuries, then why didn't Perez give Ancelotti another chance? So Perez didn't think so, and he thinks that Real is capable of winning without these players, since he is ready to change the coach. Real has become better in what? They were good in attack, the problem was in defense, and so far nothing has changed in this. And we will be able to evaluate Alonso's capabilities very soon, the first 10 rounds will be enough to understand whether they can compete with Barcelona or not.
There may be another reason why Perez didn't give Ancelotti another chance, and it wasn't just the failure of his final season before being sacked. Their defense wasn't so bad either after they brought in Huijsen and TAA. I'm sure you're saying their defense is bad because they lost to PSG, but the fact is, TAA is unavailable due to injury, and Huijsen hasn't reached an agreement. Furthermore, there's no comparison or indication of Real Madrid's strength, as we haven't seen them face a more evenly matched team. We'll just have to see how Xabi Alonso manages Real Madrid next season and whether they can compete with Barcelona for the title.
Xabi Alonso's future is worth waiting for, and I'm personally quite optimistic that he can build a much better Real Madrid team next season. This is already evident in the changes and shortcomings he's addressed to prepare for next season, such as bringing in several new defenders, as Real Madrid's problems last season were in their defense.
As for Ancelotti, I think that's enough. He deserves appreciation for his dedication to Real Madrid. Their slump last season can't be used as a reference, as it was an injury problem that affected the team's performance. I think that's understandable, and Real Madrid's management's move to bring in Xabi Alonso is inseparable from the team's revitalization and long-term project.