Yes, but if you are in a situation where you need to shoot, then presumably not shooting would be more dangerous than the potential for some glass dust or fragments in your eye(s).
I have shot through car windshields and windows for training. It does kick up some glass dust, but we had eye protection.
If presented with a lethal self defense situation, I would not hesitate to shoot through a window even without eye protection.
You may NOT be in a situation where you can just "drive away." Imagine sitting in bumper to bumper traffic jam. Someone in the car in front of you with an AK47 decides he's had enough and gets out and starts shooting motorists. You are literally a sitting duck. Yes, if you are trained and follow your training, you have left a space in front of you to maneuver, but that's not always practical, realistic, or useful (say you are in the middle lane, with cars on either side).
Shoot through the windshield, and pick a unshattered point for each consecutive round because it will deflect the same.