First of all, most people assume that the ark made it off the island immediately and then Marion and Indy were suddenly in Washington DC, Not so.
The film jumps from the island to DC but no reference was made to the passage of time. Clearly, the government claims to have it and Indy knows that which means he told them where to find it then lost track once he was in the US. Marcus was also with Indy, so Indy went home first then had Marcus in tow when he got to DC.
The film is set in 1936 with Nazis all over the Mediterranean until 1945. Indy did not want to lose the ark again, so do the math.
Indy assumes that the Nazis at the sub base heard (or at least saw the light show in the sky) when the ark killed all of the soldiers. He assumes that they won't send out a patrol until first light, so he has a few hours to hide the ark.
Where do you hide a chest made of gold? In plain site, or in this case, right under their feet. Indy didn't have to get the ark off the island, he just needed to drag it off the alter and bury it in the sand. Remember, the ark stayed hidden for 5000 years because someone buried it then died without leaving a flaming neon sign pointing the way.
When the patrol shows up the next morning, a bunch of burned out equipment, all of the lights are damaged and nobody left to explain why. The Nazis would have chalked it up to an explosion or something else explainable and went back to the base.
Indy and Marion would have to hide out and wait for an opportunity. They could have stolen the fishing boat or used some other resource. Clearly, days, weeks or even years could have gone by before the DC scene. Obviously, Indy told someone where the ark was and after the war, they dug it up, put it in a crate, then told Indy to get lost.