Recording stopped when the app closed.
Some phones (Samsung, Xiaomi, Huawei) stop apps in the background. If a recording has gaps, dontkillmyapp.com shows the setting for your phone.
From OsmAnd, Locus, Komoot, Strava or Mapy.com. Tracks stay on this device.