I've heard various opinions that if you're grounded there is a "path of least resistance" so your odds "may be higher" in your boat getting hit. But on the other side of the coin, by the bolt not finding it's way straight through and out of the boat and to the water
(by being grounded) the strike "may instead spread out horizontally" which could be more dangerous for those onboard. It's a tough call. I feel like I've been lucky either way.