Less effective that a 5 inch 38 gun, and shorter range, and a million times the price.
The Navy has turned into a sad joke from the truly formidable force it once was.
Lasers are need to counter swarms of drone aircraft and boats. Guns simply cannot fire fast enough, or at multiple target simultaneously.
They could just load up Copperhead rounds into that artillery tube, use laser drones to guide the rounds onto the target.
https://en.wikipedia.org/wiki/M712_Copperhead