I personally had what we called an “ass-puckering” moment for exactly this reason once. At periscope depth in fog, huge cargo ship coming at us… it was the only time in 3 years on board I (or anyone else) had to call “emergency deep”.
And Iron Mike probably had the conn aboard the cargo ship .... (Source: A similar experience in the South China Sea.)