I've tried watching a few replays and results vary. The guns do not disappear all the time when shooting at very close melee units, but does happen reasonably frequently. More often the top gun, but sometimes lower level ones too. To me it looks like there is some bad code that doesn't reset how far out the gun protrudes either when acquiring new targets or changing shooting distance as I've noticed the guns never ever stick out as far as they are when at rest after being used. See replay:
@Chris [Midoki] No problems does this mean that my other bug reports are either not bugs or not noticed? Or you just never got around to replying to them... haha
The cannons seem to gradually retract instead of suddenly disappearing (re comment about flickering pirate) I thought it was retracting as a form of aiming downwards but the more replys I watch the less sure I become of this thought. Anyway cheers for looking into it
This issue remains unresolved in v1.3.3. To add a bit more information, it appears Gun Towers with 3 guns (level 7 and above) do not suffer from this issue - only level 6 and below gun towers have disappearing guns.