Only if they are transmitting. If they don’t want to be found they won’t be. Ships not transmitting have to be found on the sea and under it...under it is just harder.
Here’s a ship tracker....some USN ships are on it, but only if they want to be - same with aircraft if the military doesn’t want to be found they aren’t.
Commercial subs will transmit so that 1) they aren’t mistaken for the enemy and 2) they can be found in case something goes wrong. Others not so much.
https://www.marinetraffic.com/en/ais/home/centerx:-76.0/centery:36.9/zoom:8
Thank you. So, only those who need to know/have the access, would know. Like whoever did it.