I've just tried a couple of the default quick missions and at first glance it looks like the warships don't start sending any flashing light until they get a contact.
That contact could be you, or any allied surface unit, not sure about air units.
I've not seen them flash anything else but 'contact detected' ... but I'll be keeping a good watch out just to see
I tried 'Ambush in the Palawan Passage' a few times to see some different results.
If I just sat there very quiet, the whole convoy sailed right past me with no flashing lights ..... try it again and do something to make a bit of noise ....
'Contact Detected'
and the escorts start closing whilst the main body start to zig-zag.
By no means a thorough test, but it looks like if you see warships flashing .... they know your (
or somebody else) is out there !
................ Oh yeah and it's also very easy to get distracted whilst reading that flashing light and then realise that the destroyer you had 'zoomed' in the periscope , is now no longer zoomed and just VERY close !