I don’t know if the car specifically avoids charging the 12V while plugged in, that would be weird. But it did turn out to simply be a dying 12V battery, complemented by the Tesla software doing a poor job of keeping track of the battery health, or rather not really tracking it whatsoever.