There’s a series of episodes of Smarter Everyday where the host goes on a US nuclear submarine and interviews the crew and shows some of the equipment. In one of the episodes, they talk to navigators, who explain that submarines can be invisible to sensors in certain locations because the ocean water is not uniform. Temperature, currents and salinity vary, so a sound could be attenuated in some directions.