Does the film actually show the submarine submerged for its journey?
Raiders of the Lost Ark is set in 1936, the pre-World-War-II era. Unlike nuclear submarines today, U-boats of that time weren't capable of long journeys while submerged.
U-boats usually traveled on the surface, propelled by diesel engines. They would dive to periscope depth to follow ships and attack. They would dive deeper only in order to avoid detection or attack by enemy ships. Speed was severely limited while submerged.
Diving required the use of electric power from batteries. These batteries had to be recharged periodically by running the diesel engines--which the U-boat could only do while surfaced. It simply wasn't practical or even possible for a U-boat to be submerged all the time, or even very often except when attacking or attempting to hide from surface ships.
Here are a couple of sources on this:
Unlike nuclear submarines, which could dive to depths of over 1,000 feet, travel thousands of miles submerged and remain on patrol for months at a time, the u-boat can operate submerged only for brief periods at a time. (source)
Because speed and range were severely limited underwater while running on battery power, U-boats were required to spend most of their time surfaced running on diesel engines, diving only when attacked or for rare daytime torpedo strikes. (source)
I think it's unlikely that the submarine submerged at all, even to periscope depth. Indy probably just sat on the conning tower until the submarine got near the cave, and then jumped or climbed off.