Checked out Barham. QE class indeed.
And the Warspite's hit was lucky, yes. Yet the Admiral's ships were renowned for having elite crews, and the RN capital ships trained extensively.
The Bismarck's "lucky" hit when HMS Hood exploded was at 14K, - at that range The Prince of Wales was already scoring as well.
There is one engagement that sticks out nicely. British cruiser HMS Belfast of 11000 tonnes with 12x6" guns vs. the 31000 tonne with 9x11" guns Battleship Scharnhorst. In poor visibility the Brits picked her up on radar at 30K and opened fire at 12K. Belfast scored several hits while the Scharnhorst failed to. Scharnhorst disengaged, tried again, disengaged and ran, - but into a trap setup by the British, - they had a battleship waiting. Belfast positioned itself nicely to "illuminate" the Scharnhorst while DOY (HMS Duke of York) opened fire at 11K. The Scharnhorst got hit soon enough and ran again (very fast ship). When the distance was some 18K the Brits were still scoring, and finally managed to damage her engines. As she slowed, she was surrounded and torpedoed untill she sank.
Anyway, at full speed in very little visibility, the Brits scored on a 30 kts evading target at up to 18K many times, even with the 6 inch guns.