It's important to remember that most of the USN BB light AA fit of which we usually think was very much added on an ad-hoc basis. I think the interwar idea, when they had time to really consider things like this, was .50cal way up on the masts, 1.1" on the superstructure, and 5/25 amidships, well away from blast.
By the time it's 1942, well, you cease shore bombardment fire if the skies fill up with bad guys. If you're engaging another battleship, you probably break off the engagement for twenty or thirty minutes, by which time he really won't have gone THAT far away. If the Japanese have managed to get your battleship in a position where you can be subjected to continuous battleship
and aerial attack, you congratulate him on a well-planned engagement and kiss your ass goodbye.
I'm not sure there's a better answer, short of an AK-630 farm or something