It has definitely stopped being the case. Especially today, when an ICBM can travel half-way around the world in a couple of hours.
Even at the start of World war II, the Japanese were not impeded in any way by the Pacific Ocean when they launched a surprise attack on one U.S. territory, and a surprise invasion of another U.S. territory.
It is clear to me that our “moats” are no longer an adequate first line of defense, and that they have not been for quite some time.