On Solis S5 I connected BAT- to Earth wih a 10kOhm resistor and measured 2.4V DC on it, so there is 240µA leakage current.
When floating, this charges the common mode filter caps to -195V which makes a nice ESD tester / chip zapper.
So a simple solution would be to permanently connect BAT- to Earth with a 10k-33k resistor ensuring a low common mode voltage at all times while being safe.
Contrary to what was said above the DC-DC converter between battery and HVDC bus in the Solis is isolated, it uses a transformer, I think it's a resonant topology. This isolation is mandatory for low voltage battery inverters in EU, don't know about US. Besides, low voltage stuff like fuse holders is not rated for mains safety so it cannot be at live voltage, it has to be isolated. High voltage battery inverters use non-isolated converters, so the battery is live. This is more efficient but opens another can of worms regarding safety (300-500V DC battery connected to mains can kill you in so many ways lol).
CAN and RS485 use differential signaling which gives good rejection against noise, but that doesn't mean they can be used without grounding! I see a lot of adapters with only two terminals for the differential signals and no ground. This is a mistake because it relies on the chip's internal ESD protection to dissipate high common mode charge. Or maybe there are extra protection components on the adapter board, but considering these are "aliexpress quality" I'll believe it when I see it. On my isolated CAN adapter, I don't see any. On the Waveshare "industrial" USB-RS485 there's adequate protection.
Even the isolated adapters require ground to be connected on both sides. I'm talking about the isolated ground on the isolated side of the transceiver, so this does not defeat the isolation. It simply creates a path for stray common mode current to flow, and it sets the common mode on both ends, instead of relying on the chips' input protection to do it. If "it works" but it occasionally blows then it doesn't really work
If you want hotplug the safe solution would be to use a connector like USB which connects ground (shield) first, then ground and power, then data. But with RJ45 connectors there's no guaranteed contact order for the pins, it will all make contact in random order, so even if there's a ground wire it's not guaranteed it will contact first. So common mode charge in the inverter's EMI filter caps is discharged through the adapter's signal inputs, and it gets fried. Using an isolated adapter would reduce the current spike because current then has to flow through the isolation capacitance (a few pF) masking the problem but not eliminating it completely.
Personally I would use isolation for everything, here's a DIN mount
18-75V to 5V isolated converter for example. I want my Pi to be powered by the Pylontech batteries so I'm going to install one of these. There are also PCB mount versions. Then isolated adapters for CAN and RS485.