We always disconnected our electronics in severe lightning storms. Of course having a fiberglass boat, we didn't have a problem with the magnet compass. I agree that there has to be a better compass set up--many steel vessels are successfully fittted with magnet compasses.
Our boats were sailing so we had well grounded masts, and a "cone of protection"--but with a direct hit, you can still loose electronics. Remember that the ground needs to be disconnected also. There are many examples of strikes comming from the water. Again less likely with a steel vessel, but still possible.
We were once approached by a large freighter who had a lightning strike off the Coast of S. Carolina, and asked for a position report. They had lost the sat nav, electronic compass,and log as well as all radios except a hand held VHF during this strike. If a 600' plus steel freighter is subject to this damage, then certainly a yacht will be.
It is just not the cost of loss, of electronics, but the loss of accurate navigation (and how many folks still carry a sextant and tables?).