The rules state that U.S. ships cannot move into contested sea zones.Â
There is no such thing as a contested sea zone. The rule states that the US may not move units into a contested territory. (For clarifications on this, see the FAQ thread.)
In your example, Germany may choose to either include the US ships in its attack, bringing the US into the war, or ignore them.