Now, if lightning were to strike the charging cabinet itself, I imagine that most of the surge current would go through the cabinet into the ground. If any were to make it to the chassis of the car through the charger, it would probably (“educated” guess) be at a low enough potential to not jump through the tires, but rather off some other low-hanging metal components. If it’s below the ~dozens of kV needed for that, charge will build up for a good fraction of a second, and dissipate over the next few seconds (or close to instantly if the ground wires don’t melt in the charging cable).
Really, the level of isolation in either the current case or proposed case doesn’t do that much to help with lightning strikes. They’re both designed to mitigate shock hazards measured in the hundreds to single-digit-thousands of volts. When the arc distance is measured in kilometres rather than centimetres, a 3” galvanic isolation transformer isn’t going to save you.
The solution for lighting is the same as it always has been: ideally, don’t get struck by lightning; otherwise, install a lightning rod nearby.
The lightning discharge won't create a potential difference across the battery terminals, it'll flow around the battery through the car's body into the ground.