In the mission you were talking about, the fishing boat tips you off to mines when it gets blown up.
Hiding under a surface contact helps as long as they can become a torpedo magnet. Recall how your sonar displays multiple contacts on the same bearing.
In some ways, you aren't fooling anyone (especially in narrow band). You're using the other ship as a shield. Just be careful, think about how
you assign target depths in a shooting solution. Are you fooling anyone or not?
One last thing to consider- suppose you're hiding 40 feet under a freighter that gets hit by a torpedo. You're still 40 feet away from a large explosion.

In the game it isn't that big of a deal, in real life you'd be tone deaf at least.
Plus, there's no certainty that the torp will lock on to
you.