Dielsel electrics are extemely quiet and can do a lot of damage in coastal waters. That’s not news.
On one hand, it might be nice to drive them off immediately upon detection. That basically sends the message: don't even try it, you'll fail and die. On the other hand, letting them think they can get close without being detected builds up a false sense of security on their part. Makes them overconfident, and allows you to easily kill them once you have authorization.
So the question now is, what really happened? Could they have gotten close undetected? Sure, D-E are very quiet boats on battery. (but short legs) But maybe they're being set up... The USN has done this before. In the 80s several Victor IIIs were detected in the Atlantic headed for the eastern seaboard. There was some discussion over whether to react or not...