Too bad your boat had to go the way it did
You tell that the destroyer was going farther away from you and that you lost sound at a certain moment. It could be that it was going to your deaf spot* (180 stern) and closing in from there. Destroyers like to line up and coming from the stern for a depth charge run.
* Deaf spot because your own engines cover the sound of the enemy ship, at least for the sound officer. I suggest you man the hydrophones yourself when under attack.
Better luck next time Kaleun!