Ships have teams with anti-drone weapons (probably like shotguns...and others). The question is did one of these drone get captured and, if not, why not?
To be expected. Drones are cheap these days and it wouldn’t be any great shakes to create some software that stitches together video feeds from multiple drones to get complete 360 views of the outside of any warship or base.
Could also use them to do penetration testing of electronic emissions, etc. This ain’t the 1940s.