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.