I cannot remember where I read it or where it came from, but I read that getting a "booster" for small dogs so they can see outside the car can help. You can apparently buy little baskets that are raised high enough so small dogs can sit in them and look out. I have no idea if this actually works, but it's a harmless hack to try.
If tricks like that don't work, then you should speak to your vet about medication.
If tricks like that don't work, then you should speak to your vet about medication.