If you think Real Madrid will underestimate any opponent in the remainder of the season, then I guarantee you are wrong. Then from that, this season only leaves 9 matches instead of 10 matches with an 8 point advantage over Barcelona. Of course it's still not safe, but to make some rotations to focus more on the Champions League, I don't think it's a big problem.
Real Madrid is currently one step safer in Laliga because the 8 point difference certainly means they are without pressure and can play relaxed but still not underestimate their opponents, including when they meet Barcelona later. I am willing to bet that in Elclasico, Real Madrid will win the match because this season Real Madrid is the owner of Elclasico. but not for the Madrid Derby, they lost both home and away matches against Atletico Madrid. Barcelona this season is not very impressive so I think this season Real Madrid will find it easier to win the La Liga trophy with 9 matches remaining.
Ancelotti knows exactly about your concerns about the potential for Real Madrid to fail to win the title without the threat of Barcelona. Bbut I believe that winning 8 points is a blessing in itself for Real Madrid to remain comfortable in every remaining match this season, even for the El Clasico match against Barcelona.
Regarding the UCL League, Real Madrid will face the defending champions and of course Man City is not just any team, last season made Real Madrid helpless. However, this season Real Madrid is a little lucky because several players have arrived, such as Jude and Brahim, who will make a surprise when facing Man City. Moreover, there was news circulating that Man City had lost its mainstay defender, Walker, who suffered an injury while defending his country. This will be an advantage for Real Madrid. Moreover, Vini will have more freedom to play her role.