I've seen similar behavior. I was trying to penetrate the inside of a convoy as well sitting at 20M. By a miscalcuation and stupid use of TC I got too close to the lead destroyer and was detected.
Like you I was running silent with zero propulsion.
At first I was angry as well thinking how could they find me if I wasn't moving. Then I thought that the U-Boat is probably still emitting noise even though running on silent. With the destroyer so close, even this small noise is enough to get you detected.
The lead escorts usually favor one side of the convoy's movement. Go to that side and stay way over until the lead destroyer passes. Then head straight in.
__________________
|