Getting in the car is a timed action, if it gets interrupted - like Yana describes - the door will remain opened (we're working on this!) One way to know that it's closed for sure is to wait for "door closed" sfx once in the car before pressing any other key.
Additionally, during the "getting into the car" and "before the door is shut" char is vulnerable to bites and scratches from zeds. At this stage the char might not be visible but - since there are no anims to show this to player - they're in the process of getting into the car with the door open - so zeds can land an attack. In other words, it is not a good idea to enter the car with zeds surrounding it. Hope this helps!