In the Android Auto settings you can setup so that wifi is turned off if connected via USB to the car. This ensure you have mobile data available for maps, etc. Once you disconnect from the usb, your phone wifi will turn back on (assuming it was on when you connected).
Rich
** Sorry correction...