See the "GPS Accuracy" picture on this page: https://www.singletracks.com/blog/mtb-gear/gps-accuracy-gps-vs-smartphone-vs-cyclocomputer/. There it is evident, that for example the "iPhone 6s" has much higher variance than the "Garmin Edge 520" or the "Bryton Rider 330". Also here is a nice comparison: https://www.singletracks.com/blog/gps/gps-distance-accuracy-test-smartphone-apps-vs-dedicated-gps/. So standalone GPS can be a major improvement in terms of positioning variance.
variance. (Or the iPhone is bad. :D)
Furthermore, I'd suggest to mount the GPS device on your helmet for lowest positioning error. I found, that by carrying a smartphone in an arm-band on my right upper-arm facing outwards resulted in a systematic(!) positioning error of 5m to the right. I was running in a forest. So deflection and reflection of GPS signals is essential.