The hull and superstructure plating of the 'destroyer' attacked by 332nd FG (probably TA-22, a 1915 built Italian destroyer later downgraded to 'torpedo boat') would have been way thinner than a WWII German sub, and mild steel not high strength steel. Perhaps as thin as 6mm when built, then almost 30 years worth of corrosion. In some cases of WWI built US flush decker DD's re-activated in the WWII era it was said you could put your fist through the shell plating by then
. But even most DD's built in the '30's and during WWII had no specific armor protection at all and structural requirements allowed plating thinner than sub pressure hulls, especially in the superstructure. Most WWII-era DD's could easily be penetrated by 20mm AP (this happened to RN destroyers in attacks on German convoys defended by light craft off the French coast, also to the flush decker USS Borie when she fought a U-boat on the surface), or even good square hits by .50 cal.
There were exceptions, like the big US wartime DD's (Fletchers, Sumners, Gearings) which had ~19mm thick 'special treatment steel' (equivalent to rolled homogeneous armor) hull plating above the waterline for part of their length, and 12.5mm STS in parts of the deck and some other key places (eg. the main gun director), especially for protection against shell fragments and strafing. But even those tougher than average of DD's had large areas easier to hit squarely in a strafe than a U-boat.
On sub's conning towers, a Type VIIC's was 32mm thick, in contrast to only 18 for most of the pressure hull itself. The conning tower could definitely defeat any .50 round of WWII. Only the small target of the pressure hull itself above the waterline offered even theoretical vulnerability to .50 cal.
Joe