I think it depends on the situation. From what I could gather, two scenarios would occur. In the vast majority of cases, a submerged boat would be depth charged until it would either sink or escape. In the game, it can take quite a few hits before getting sunk, so you’ll have a chance to escape, as long as the escorts lose track of the boat, and you don’t surface immediately. You’ll lose the convoy, but you’ll survive. Then it’s up to you to decide when to abort the patrol and how much you want to push your luck, based on the state of the boat and the amount of damaged systems. For instance, it’s probably not a good idea to keep going with leaking fuel bunkers, regardless of the state of your hull or other systems. It may not have been clear from the videos, but it’s impossible for a single hit to sink the boat. It’s always an accumulation of hits. But of course, late war, there’s a chance that escorts will harass you until they kill you, which is the realistic scenario. But I want to stress that surviving the entire war will be very difficult regardless.
Another possible option given to the player, when surfaced, will be to scuttle the boat. In the most dire situations, when attacked on the surface, the captain sometimes ordered the boat evacuated and scuttled. But allies would not play nice and stop firing until they see the boat go down, even as the crew evacuated, which resulted in heavy casualties on the German side. If forced to abandon the boat, you’ll have a small chance to be picked up by a friendly ship, and you’ll be given a new command, keeping whoever survived among your crew and officers. But scuttling right in the midst of enemies will result in you being killed or taken prisoner, and a game over. I’m contemplating rolling a very low chance of the captain escaping the pow camp, which would give you a chance to resume the campaign at a later date, simulating the time your captain was kept prisoner. I’m not sure if this ever happened in real life but I don’t think that it’s totally outside the realm of possible.