#1 He wasn't able to defend the shot because he threw his left and shifted forward. In the Khabib fight, Conor sees the entire sequence. He could've avoided the shot but choose to throw a potential fight ending knee instead.
#2 His defense against Khabib is overblown, he was using every trick in the book. The reason it may appear to be harder for Khabib was because he initially did nothing but grab a leg. He had no momentum or opportunity to put Conor on his back with the shot. He then takes the single leg and uses it to get Conor off balance, but he had to create that from nothing, he didn't have the momentum or surprise factor like Dustin. He just said I'm so much better than this guy, I'll dive for a leg and I'll still eventually get him on his back.
His takedown defense may have been a bit sharper due to the intense grappling preparation he had prior to the Khabib fight, but his actually takedown defense on a technical level wasn't better or worse, he just disrespected Dustin and got caught by surprise.
The Khabib sequence just took a bit longer because it wasn't a real takedown attempt, it was a literal dive for one leg, which he was able to take advantage of after a little struggle. If Conor left himself open for Khabib to dive under similar to Dustin, Khabib would've done the exact thing Dustin did, and truthfully if Conor wasn't grabbing his shorts, Khabib would've gotten him on his back much much sooner.