Despite its blockbuster status and stellar reputation, director Steven Spielberg's 1981 action-adventure Raiders of the Lost Ark had its share of controversies and even a few continuity errors. One of them has baffled fans of Indiana Jones since the film's premiere: Indy's astounding ability to travel alongside a submarine without drowning. It arrives late in the film, after the Nazis have seized both Marion and the Ark. Indy makes a desperate move to stay with them by swimming to their U-Boat and hitching a ride. It's less a straight continuity error than a lack of detail surrounding his actions. However, the mere existence of the Lost Ark submarine controversy speaks volumes about Spielberg's challenge in making the movie.
Source:https://www.cbr.com/indiana-jones-raiders-of-the-lost-ark-deleted-scene-submarine-controversy/