The dog barks and just enjoys the ride in the car. Dogs love to lean out of the window: to bark, breathe, and just. This is possible only at low speed and where there are no other machines.
And, of course, provided that the dog is on a leash, and someone controls it. First, the dog may not notice the branch on the roofs, and secondly, loud bark to scare the driver in the next car and cause an accident. Pay attention to the unusual behavior of the dog: if you see that she is sitting in an unnatural position (perhaps it pumps), if she has increased salivation (perhaps it is hot) and so on.
If the animal is nervous and behaves uneasy, try to find out what exactly causes her excitement — speed, restriction of movement, changing landscapes outside the window — and gradually train the animal to a calmer reaction to these factors.