If it works with one cable but not another an obvious question is whether it's the cable that came with the charger that's the problem. Do you have another USB C-to-C cable you could use instead to test (I'm guessing your laptop cable is USB A-to-C)?
Of course it could also be that it's more sensitive when doing high-power charging. I don't know how the liquid/debris detection works, but it's easy to imaging that a small problem could be more visible when applying higher voltages and currents, or, since the chance of damage is greater, that the phone might have a lower tolerance when charged faster. I don't have this phone, but my previous Pixel never had a setting to disable this, and TBH I'd be disappointed in engineers who provided a way to disable a safety warning where a lithium battery was involved. So all I can suggest is trying a different cable, trying a different high-powered charger if you have one (e.g. the USB-PD chargers for my laptop work perfectly fine for phones like the Pixels which use USB-PD charging), and if the problem remains then the common factor left is the phone. Hopefully others with this phone will be able to say whether this is something they commonly encounter.
For what it's worth, I had my Pixel 2 for more than 4 years and never saw this warning once. So my instinct is that if it's happening repeatedly something somewhere isn't quite right, but it's hard to say what (the cable would however be the simplest and cheapest solution, and problematic USB cables are not unknown).