Naval surrender policies

What were the policies of different navies regarding surrendering to enemy ships? I have often seen stories of Nazi or Japanese ships fighting even when there was no hope of victory or survival, but this also appeared to happen in the British and American navies (USS Houston and HMS Exeter during the Battles of the Java Sea, for instance). On the other hand (spoilers), there is the capture of U-505 upcoming in 1944.

Thank you and keep up the amazing work!


Many thanks,great question and a very heartfelt welcome to the forum


Thanks for the welcome, @Chewbacca. Please do let me know if I can phrase my questions easier to answer - I’m wordy by nature, but I’m trying to be brief.