The abovementioned fictional race aren't exactly merpeople from fantasy, but I call them like that just for the sake of convenience. Rather, they're semi-aquatic humanoids, who are really good at diving. This species still possess legs like humans, and they spend most of the time on their giant biological ships — which serve to the merfolk as mobile homes and fortresses. However, they almost never step on land (they don't even need to) except when raiding human coastal settlements and cities.
These bioships are basically domesticated "kaiju", looking like a cross between a turtle, a whale and a dragon. Their average length vary within 300-400 feet, they can reach speeds of approximately 30 knots and dive to more than 1000 feet under the surface for a long time. Like tortoises, these bioships have large bulletproof carapaces under which there are large cavities filled with air — where the merfolk live most of the time. From there the "crew" controls their living ships by utilizing some kind of psychic link with the bioship's mind.
There are dozens, if not hundreds of such kaijus, roaming the oceans. Many of the tribes consist of only one bioship, some unite in small fleets. But still most are divided and the tribes constantly fight between each other for resources, fishing territories, slaves and etc.
When a bioship's crew encounters an enemy (be it a hostile kaiju or a regular ship built of wood or metal), the tribe sends a "cavalry" (warriors riding dolphin-like animals) to deal with the threat, while the home carrier tries to hide. The warriors, armed with various bladed weapons, are accompanied by a dozens or even hundreds of specially bred fish, designed for suicide attacks by exploding themselves with
highly corrosive acids capable of eating steel some kind of biological explosives — picture crashfish from Subnautica, but much deadlier. While the riders distract hostile ship's protectors (if the enemy is an another merfolk tribe), the suicide fish try to get close to the enemy's ship and breach its hull/carapace, thus incapacitating ship. However, if the enemies appear to be stronger, the entire tribe simply flees the battle.
For some reason, humans and merfolk didn't really encounter each other until this world's mankind reached 1940-1950s technology level. At this point merfolk started pillaging coastal towns and cities much more frequently. Naturally, the government couldn't ignore such a threat to its national security and began to dispatch military fleets for patrolling. However, because merfolk tribes do not possess any serious firepower, compared to conventional WW2 ships, they usually resort to hit-and-run tactics, fleeing away, once patrolling destroyers show up on the horizon. Alternatively, if the pillagers feel lucky, they might try to sneak upon the military ships in order to unleash acid fish on them.
And here is the question. I am by no means an expert on the naval tactics and technologies, so I would like to ask you for advice. What would admirals likely do in this situation, if the goal is to provide security for the vulnerable regions? Is there some way to track kaiju-ships in the open ocean? Or maybe it's better to reinforce static defences at the coastal cities, rather than trying to find a needle in a haystack? Anyway, an expert opinion from you is much appreciated!
P.S. One of the most likely strategies would probably involve hiring some tribes as mercenaries. Land humans have invented a lot of things that merfolk can't produce. Firearms, armor, medications, electronics, you name it. By bribing some of these pirates, humans can incite more infighting among warring tribes, thus reducing the threat to their cities to a more manageable level.