.....DON'T DO IT!

EVER!
I know it is a bug. I've done it, errr...I mean Bernard has done it before.
If it happens, your sub continues on down into the abyss unless you run at full or flank speed or until you surface. Of course if there is a destroyer hunting for you up there, it makes your life a living hell.
It happened again yesterday. I have CTRL+C set as report nearest contact and I missed the CTRL key and hit C while starting to head to the depths from periscope depth trying to evade an escort after sinking a small merchant. I hard alarm bells and it was

time.
I had to put DID on hold and start from a previous save.