Because Law couldn't land his cutting attacks on Doffy, due to latter using his full knowledge on the Ope Ope no Mi along with his speed and agility to avoid Law's ability most of the time or block his attack before it connected. That's why he had to play dead, to land Gamma Knife when Doffy did not expect it. So it's not that Doffy's Haki blocked the cut, Doffy prevented Law from performing the move in the first place, or simply by dodging and avoiding. Doesn't change the fact that Caesar, Doffy and the Vivre Card all highlighted Vergo's Haki.