In a lot of EVs, when the car is "on" there is a DC/DC converter powering the 12V system from the HV battery. So if the car was "on" and experienced a loss of the 12V battery it could continue operating for some period of time.
Mine failed after ~5 years. Replacement was inexpensive ($128) and Tesla service drove to my house to install it.
Like another poster in this thread, my original model 3 battery went ~5 years (typical 12v failure age in a car), and I bought it for $89(!!) at Tesla. Autozone wanted $125 for the same group battery. I did a DIY replacement. For some reason, that one failed after a year and a half. Just bad luck I guess.