Incorrect Elevation when Riding Outdoors

I have an issue where every ride I do outside with friends has a different elevation gain compared to them when they use their bike computers. The Fenix 5X should be accurate. Once my ride gets uploaded to Strava, I usually go to the site and use Strava's elevation gain correction and it fixes it. The elevation on my watch and Garmin correct stay incorrect. How do I fix it so that I don't have to do this manually everythime?