That was pretty bad luck. I tend to get away with engaging Trawlers etc, and winning with the deck gun.
But, get caught out in a Harbour and you're done for - I just got to Halifax and was spotted diving, there were literally 8 DDs pounding me for ~6hours till the flooding exceeded pumping
Found it quite easy to slip into Scapa Flow with a Type IID, weaving between the nets and wrecks (love GWX) and getting out before I got into too much trouble