If Lewis Hamilton was driving a Williams this season, he would definitely not be leading the world championship. If Robert Kubica was at the wheel of Hamilton's Mercedes, he would probably not be leading the world championship.
Hamilton is a driver at the peak of his powers, but that does not mean he could overcome a car that is so much slower than the rest. Equally, the Mercedes is evidently good enough to allow a driver to win races and lead the title battle, but Kubica is a driver making a comeback after eight years out of F1 and still has question marks over his ultimate ability. He would have a much better chance than he has now, but it is unlikely Kubica would be producing the sort of performances Hamilton has unlocked so far in 2019.
The point of this comparison is to highlight that while car performance is vital in Formula 1, it is a frustrating myth that it is absolutely everything. It is one of the great misconceptions about motorsport: the idea that any driver could get in a top car and win straight away.