If he didn't think they were friendly, he would shoot them!
Is this gunner a member of a player group?
As for gunners getting out of a damaged jeep, there is no fix. That is default AI behaviour. If you really need him to stay in the jeep, then you will have to add an eventhandler to the jeep that keeps it from getting damaged or reduces the damage. Put it in the script were you maker the gunner get in the jeep.
myJeep addEventHandler["hit",{(_this select 0) setDamage 0}]
or
myJeep addEventHandler["hit",{(_this select 0) setDamage (damage _this select 0)*0.5}]
When you want to turn it off:
myJeep removeAllEventHandlers "hit"