After the
Laconia incident in September 1942 Dönitz issued orders to the U-Boat fleet that efforts should no longer be made to pick up or give assistance to enemy (Allied) survivors.
The German skipper of the U-Boat which sank
Laconia plus another U-Boat surfaced in order to pick up survivors, and had hundreds inside the boats, standing on the casing, or being towed in lifeboats. The German skipper broadcast messages explaining his actions in the expectation that the Allies would assist, or at least not attack the U-Boats .
As it was, despite large Red Cross flags being displayed, an American Liberator attacked and the German boats had to submerge, resulting in several hundred deaths of men, women, children and Italian POWs.
There was another incident in WW1 (I would have to look up exact details - I can’t remember everything !) where a British armed trawler declined to rescue the crew of a Zeppelin which had come down in the North Sea and remained afloat for some hours. The incident caused outrage in Germany.
Edit:
WWI Zeppelin Crew Left To Die In North Sea - 1916