Lucas Vazquez was the first name to come up as a replacement for Carvajal, he is a natural replacement for Carvajal and has been playing in that position so far. Losing Carvajal is not the same as losing any other player, apart from his status as a key player in the Real Madrid squad, he is a leader who always pushes his teammates to be better. Ancelotti can overcome the problem in the right-back position by utilizing the number of players he currently has, in addition, Real Madrid can use the winter transfer market (January 2025) to bring in new players.
Finding a replacement player like Carvajal is not easy because he is a leader in the team and his abilities are also very much needed. Lucas Vazquez plays in the same position as him but he does not have determination so there are some weaknesses that Ancelotti may need to overcome. The issue of recruiting new players has not been discussed at this time so maybe Ancelotti will try to utilize the existing players.
The transfer market has also not opened so Ancelotti only has the opportunity to play the existing players. I think he has options at right-back even though he is not at Carvajal's level in terms of quality. The collective play that the players have shown will make that gap work together.