Nobody expected so many defenders to be injured, and Ancelotti certainly doesn't want to be in that situation. But strangely, when it happened, and he had the chance to fix things (when the January transfer window opens), he did not take advantage of the opportunity, and it was as if he underestimated the problems they were facing. So for that reason, Ancelotti is indeed to blame for their failure.
I think that's the reason why he stepped down, because he felt he had made a mistake that made Madrid fail to win a trophy.
I really don't think so, it wasn't even just this season that ended that Real Madrid started having serious defensive injuries it was the other one. It wasn't Ancelotti's fault that the team was reinforced but the fault of Perez. The coach had requested for the players he needed but the management did otherwise. The coach has no other choice than to manage the players that he already has.