In Europe, when Germany invaded the Netherlands, most of the navy’s submarines evacuated to the UK, where as I recall, their most modern piece of kit, the
snuiver,¹ was soon removed by the British because they saw no use for it. The Germans, though, captured a few subs with this device and pretty quickly copied it for their own boats, calling it
Schnorchel.
Just looking at
a list of Dutch submarines shows that many in both Europe and Asia remained in use after the surrender of the Netherlands and the Netherlands East-Indies, respectively, and several even until after the war (the
English-language equivalent doesn’t show dates in the list, making it a lot more work figuring that out).
This seems to be a fairly good look at the subject, though I haven’t watched all of it:
https://www.youtube.com/watch?v=tA3r7ZxuS9s
¹ Which, I just learned, was the reason for the Dutch navy to distinguish between the duikboot (lit. “dive boat”) and the onderzeeboot (lit. “undersea boat”): the former is capable of submerging but not of staying underwater for extended periods, the latter can.