In that match, Real Madrid did not field the main squad and the back row was also filled by two defenders who did not have sufficient flying hours. However, regardless of the many goals conceded by Madrid lately, it was indeed because the crisis in the back line was very severe. Of course, the victory was an important capital and became motivation for the team to return to the path of victory.
You are right that in the match against Leganes Real Madrid did not field their main squad. Because the names of Real Madrid's star players in this match are not even on the list of reserve players, like Mbappe and Bellingham. So it's natural that in this match Real Madrid could only win narrowly 3-2 over Leganes. Because in this match Ancelotti did not field his main squad completely. But even though in this match the players fielded by Real Madrid were second tier players, I admit that their performance was quite good, especially on the front lines. Because being able to score goals without their main players, I think is quite impressive for Real Madrid's second tier players.
Apart from that, Modric was also able to score a goal for Real Madrid in this match, and I was quite happy to see him being able to score another goal. Because at his old age, it will definitely make it a little difficult for Modric to remain as productive as when he was young. So being able to still score goals, even though not as many as before, I think is an extraordinary thing for Modric.
Apart from that, in this match it is true that the defense of Real Madrid's second tier players was not good. Because they conceded 2 goals in this match. But that doesn't matter, because Real Madrid's second tier players also need more flying hours, so they can break through to become main players someday.