They were both much more skilled than him. They had better DF mastery, having awakened their powers, and kata had better haki.
Luffy only won because of his special nika fruit.
Kata had better Haki but they were still close level. Luffy improved his Haki to win vs. him.
If the Haki level difference is too big then DF can't make a difference. It should be close enough.
Law's and Vergo's Haki level was close so Law cut Vergo. If Vergo had much better Haki, Law's ''Ultimate'' Devil Fruit wouldn't work.
Whoswho had ancient zoan DF + CoA, and still couldn't overpower Jinbe's CoA, when Jinbe got serious.
Zolo's swordsmanship and special swords doesn't work if he fought someone with much greater Haki. Pica's Haki was around his level so he cut Pica with a lower level technique than Daisen Sekai.
Oden couldn't clash with Roger due to Haki level difference.
If Rayleigh and BB didn't have close Haki levels, BB's DFs wouldn't make a difference, Rayleigh would win via much better Haki.