Doflamingo assaulted Fujitora and was comfortable he could deal with him later. But the thought of provoking Kaido shook him to the core. Also, when Doffy abandoned the Shichibukai when faced with the options of either going against Kaido or having the admirals being dispatched, Law said that acting in favor of not messing with Kaido was the only logical choice for him.
I mean, certainly an admiral is above a Yonko right hand man, but the Yonko have been portrayed as the peak in power. With Kaido being the world's strongest creature, different sources calling him strongest too, with Oda basically putting Kaido > Akainu in the SBS, and Shanks being his peer, fighting off Kaido before Marineford and confidently walking into the war to end it.