There is no definitive answer for this. Your GPS track length will be absolutely accurate in length - if your GPS recorded an absolutely accurate track. Whether it does depends on the quality of your signal, whether it has any 'jitter' etc. SOme GPS are prone to record points whilst they are still getting an accurate fix, which can mean overestimating your distance by quite a margin. Best to look at the track to spot anything like this, then you'll get an idea of the accuracy. On Walkhighlands the figures we give are from GPS tracks which have been 'cleaned' of any errors or jitter.
On the other hand GPS is really not very accurate at all for calculating your altitude, as the satellites are configured to get your lat/long position accurately, but cannot locate an accurate point in the vertical plane (Garmin have an explanation of this in the 2nd paragraph here:
https://support.garmin.com/en-GB/?faq=QPc5x3ZFUv1QyoxITW2vZ6 - stating GPS height fixes can be anything upto 400 feet or so out; Viewranger have a page about it here:
https://support.viewranger.com/index.php?pg=kb.page&id=60).
It's much more accurate to cross-check your accurate gps-positions against the Ordnance Survey digital terrain model (similar to what is used to draw contour lines) and calculate altitude and ascent from that - which is what most GPS software does these days, ignoring the GPS-calculated heights, since the OS digital terrain model is free. It used to be that alot of GPS software did use altitude from your GPS - but that was in the days when the OS terrain model was something that had to be licensed.