Some dash cams have a 'parking mode' which allows them to record even when the vehicle is off; typically, most cameras shut off after the vehicle is shut off.