The reason seems to be that CarScript::EEItemDetached only calls LightsOff on server, but UpdateLights is called imediately for both server and client. The headlights then only turn off when entering the vehicle.
Tested working fix is to move the LightsOff call out of the IsServer() check.