No, it is not possible to recover location sharing tracks that are automatically deleted in ArcGIS Online. By default, once location sharing is enabled in the ArcGIS Online organization, it is set for 30 days and cannot be changed. All deleted data including automatically deleted data cannot be recovered from the ArcGIS Online organization's location sharing feature layer. Location sharing data is automatically deleted to maintain privacy.
To retain location sharing data beyond 30 days in ArcGIS Online, export the data monthly before the expiration date from the location sharing feature layer's Overview page.
Note: Alternatively, the duration of the automatic deletes can be extended up to a year in ArcGIS Enterprise deployments.