Real Madrid defense needs adjustments and improvement, I'm sure this issue of poor defending is known to the coach Ancelloti because I see Real Madrid making signings and addding Rudiger also to the backline and as rumors has it they are still very active in the transfer market so they are working on strengthening their defense lines for the next season.
Rudiger was brought in from Chelsea to guard if one of their defenders could not play due to injury or card accumulation. der Militão is well known as an emotional defender and his hard game makes Rudiger an option at centre-back when one of them (Militao and David Alaba) is not playing. What Real Madrid did by buying Rudiger was one of the best efforts to welcome a very tight next season.