I use a simple rule for this issue.
If you are still within Hydrophone range of the convoy/ships then you will be creditited for the sinking. I mean max hydrophone range, all stop, silent & 40m. So realistically you're looking a somewhere between 30-50km.
Just shadow the convoy on either flank and you will get credit. Even if you don't you'll know for next time.