In case this is useful for others, a friend of mine recently ran into this problem when their laptop was plugged into a dock but not when it was plugged directly into the power adapter. A USB-C diagnostic adapter showed that the dock was indicating the power available was 10W less than what the adapter was advertising, that presumably being the amount reserved for use by the dock. So the fix, other than turning off the warning in the BIOS, was to use a power adapter that provided at least 10W more than required in order to power both the dock and the laptop.
