whenever you see someone making the claim that a gun won't work on an aircraft, I urge you to look at our entire aviation history of vehicles with guns strapped on. Planes, helicopters, jet-packs, 'manned platforms', whatever your fancy.
we're not talking about glocks ductaped to DJIs here, and all of these mysterious engineer efforts that 'just doesn't work out' are hurdles that man has faced and conquered before.
What I would suggest is that if anyone trying to give you a technical reason that ends in "It just doesn't work" they are probably unprepared to accurately brief you on the topic.
> I urge you to look at our entire aviation history of vehicles with guns strapped on
Stabilizing moving firing platforms has a fascinating history going back to Bronze Age chariots.
As for planes and helicopters, there is a reason their big guns are mounted into the airframe, and why the biggest cannons in the air are on fixed-wing aircraft.