GPS watches don't need service, they just need line of site to the GPS satellites. Uploading to Strava requires service, but that can be done any time after the activity.
GPS tries to cover the whole globe, app uses GPS to get location. Ship probably has internet connection in the from of wifi or a cell tower with a starlink or other sattelite backbone link and app's traffic is encrypted so ships firewalls cannot easily block this