That, in fact, is what the USN disproved when conducting their monitor tests. They mounted a heavy gun, fixed straight ahead in the superstructure of an old monitor -- may have been
USS Wyoming although the wiki article doesn't say so. Trials proved the muzzle blast did NOT damage the lower turret or harm the crews.
British battleships couldn't do true superfiring for quite a while because their turrets had open sighting hoods, which would have been a problem. They were also useless shell traps.
Here is a plan view of Dreadnought. Firing those wing turrets directly fore or aft may have been theoretically possible but would have caused inordinate damage.
ETA: Actually USS Florida,
BM-9, not Wyoming. Several of these monitors were subsequently used as submarine tenders, giving the USN submarine tenders with 12" guns!