I don't think I've ever disconnected the battery while doing a HG change.
Unless it was in the way, but I don't make a habit out of it.
Then again, I'm not prone to leaving tools in places that can be dangerous.
That being said, accidents do happen so usually at the first bang/clonk/rattle...