Completely different situations between the two. A combatant naval vessel of this type should never be "rammed" by a merchant ship in open waters. This was an error in navigation, not a security breach in a hostile harbor.
I’m well aware of how different the two situations are. But the issue of situational awareness and continual close monitoring of a ship’s surroundings exists always, everywhere. A mere “navigational error” does not begin to describe how a US Navy destroyer ends up in a collision at sea with an enormous cargo ship.