Problem with voltage comparator with relay
The problem is the comparator has to have a supply voltage for all cases. So, V1 as well as Vbatt have to be connected to pin 7. You should use ORing diodes for this.

The reason that the comparator gets damaged is due to the internal clamping diodes. If there is no supply voltage connected to pin 7 and Vbatt is connected to pin 2, Vbat will burn these clamping diode and damage the comparator.
These clamping diodes are the reason you measure about Vbat at pin 7 in simulation. In simulation, components however don't burn/damage.

Speaking of using ORing diodes: why not replace the complete schematic and use 2 ORing diodes?

I don't have access to the circuit editor: do check this answer for an example of ORing diodes: https://electronics.stackexchange.com/a/453741/200815