@kamarasm you could try opening a GPX you know loads in a plain text editor (notepad on Windows) and then open the one that will not load.
You will see simple coding, just see if there is any obvious difference or special characters.
I used to have to do this on every upload from a Garmin Etrex to have Strava read the elevation from the GPS.
Or upload to GPX editor or similar, add elevation then redownload. GPX editor (or why others editors) will rewrite the GPX header.