A unit must momentarily reveal itself as a non-dummy unit to make the Gun lose concealment. A12.14:
"If the only Good Order enemy ground unit in LOS is itself concealed when a concealed friendly unit makes a concealment-loss action (other than breaking or being Reduced/Wounded), that enemy unit must completely forfeit its “?” momentarily (to prove that it is not a Dummy) if it opts to force the friendly unit to lose his; the viewing unit’s momentary forfeiture of concealment is instantly regained."
There's no race to see how fast you can roll dice in ASL *. Case G says the gun will lose concealment if in LOS of a Good Order unit, there is such a unit, so the gun loses concealment. Even if the gun hit and eliminated the target, the Gun still fired while there was a Good Order enemy unit in LOS, so the Gun would lose concealment. See the second EX in A12.14, "even if that fire had broken or eliminated the German squad".
* From this Q&A:
A8.3 Can a unit drop its concealment to void a possible Subsequent First Fire attack after the declaration to SFF has been announced by the Defending player?
A. No; ASL is not a race to see how fast one can roll the dice. [Jim McLeod to Perry Cocke, ASLML 26 Feb 2003]