Truthfully, Madrid are going through a lot and no one is seeing it. Their past two games; Leganes and the game played yesterday to Real sociedad, they have been struggling and have always escaped by a hair's breadth. It's quite obvious that Madrid aren't as in form as they are trying make people believe and with all this lucky wins they are getting, will they be always lucky with their remaining games in the Laliga and even in other competitions?
Real Madrid are three points behind Barcelona and have been desperate to win any game they play but it's starting to show that they have a very poor defense and if they don't work on this it will cost them hugely. Ancelloti has been doing a good job so far but it would be a big blow of his boys can't lift anything this time around.
I actually agree with the thing you are stating. Real Madrid are having more difficulty in getting comfortable wins recently. First Leganes were almost stealing a point from them. And last night they barely eliminated Real Sociedad AET.

We watched 5 goals in the last 20 minutes of the game.
3 of them came from Real Sociedad. This happened at Santiago Bernabeu man.

Ancelotti's students don't have any problem with scoring maybe. But the defense is just in horrible shape these days...