I had a similar thing happen in a 'pretend' career I started. 1945 and I tried to sneak through the English Channel with a snorkeling XXI!
After hitting three mines I finally came to a dead stop directly in front of a fourth mine. I was actually kissing you, you could hear it scraping the hull as I slid down to the sea floor, 37m down.
No matter what I did I couldn't get my elec engines to kick back on, even though all repairs (except a destroyed front battery) was repaired. I finally tried to CO2 enough to get the snorkel out of water so I could diesel away, but surfaced by accident catching the attention of an armed trawler.
Within moments I had a trawler and two destroyers taking turns depth charging me as I sat there nudged against the mine cable and at least three other ships coming!
After three or four runs it was obvious they weren't going to kill me, since they were dropping too shallow. Finally I got bored and blind shot a torpedo after one of the destroyers passes. Somehow it not only hit, but it also sunk the destroyer!! Yay!!
Still bored though I decided to surface again and flak gun it out since I was out of useable torpedos. Somehow my gun crew managed to get into position before the hatch was destroyed by fire from the three ships nearby now. I got one round of flak off before I had to rearm, but couldn't due to damage.
Above water now I made a run for it, my damaged disels running at flank at 6kts.. heh I got about 550m away and crash dove coz like thats what you do right?

At just under periscope depth I was destroyed by pressure! (think I was at 6% HI or something)