Agut did not beat a well playing Djokovic in Doha or a focused one in Miami. What matches were you watching exactly? Djokovic was listless in Doha, his footwork was a mess, he was standing 10 feet behind the baseline in all his matches and just not playing his best. You can even find posts where I have said this and how he needed to improve to win AO. Thankfully, he did. Both Fuscovics and Basil gave him all he could handle in Doha, and he played a solid first set and a half against Agut, nothing spectacular since Agut wasn't doing much to hurt him, but then his game completely fell apart and he lost in 3. That's not the definition of a well playing Djokovic.
Then in Miami, after struggling matches against Tomic and Delbonis, he did the same exact thing in the match with Agut all over again. If someone beats Djokovic playing close to his best, I will say so but clearly that wasn't it.