I can’t say there is one sure-fire way to keep mice out of cars, but there are various deterrents. We have had great success with our boat and travel trailer using bar soap and/or dryer sheets. Scatter these around the inside of the car (under seats and dash, glove compartment, etc.), but that still leaves the engine compartment vulnerable. You can set traps or even try commercial fox urine.