Run Silent...Run Deep.....if that aint possible always head away from the DD maintining as thin/narrow a profile as possible whilst using 'silent running' mode.

If you get detected in shallow water your only option might be to surface and duke it out but I wouldn't hold out much hope against the DD.
Flower corvettes are a little different because their gun is at the front...let him pass over you then surface quickly and fire at his DC's using your deck gun.
PT boats can be more dangerous than you might think with their quick firing machine guns/oerlikons...they can 'mince' your gun and deck crew in no time...better to submerge because they don't have the ability to detect you then
If all else fails...bend over putting your head between your legs and kiss your sorry ar*e goodbye
All the very best kaleun gasparweb