What are you talking about?
Wasnt Luffy the one losing to a Shishibukai several times?
Just because something happened in the past, doesnt change what he does now. The manga has the clear statement: Kid and Law together won against Big Mum.
Additionally, Kid went to WCI and stole what he wanted to steal, without any problem. Also he "lost an arm" against Shanks pirates. How he lost it, against whom and why, is still hidden. But yeah, after that, he lost against Kaido. Like the deus ex machina Luffy himself, with his godly gifted DF, End Game Tier trainer etc. pp.. But guess what, even that Kaido aknowledged him. Still, he was able to fight Kaido for longer than a one shot, way before Luffy arrived in Wano. Hawkins stated that. So Kid was stronger then luffy pre Wano. Without God-Level-DF, without Rayleigh training, without Plotarmor of Doom.
Law did as much as Kid. Not playing him down, but they acted as team and won together.