I know the Pixel phones prevent this. By default, USB connections are for charging only. The user has to explicitly enable data every time the phone is plugged into a PC
Even if USB debugging is enabled the user has to manually accept the RSA host key for any debug access to occur.