The question and answer both helped me realise that the Elevation Profile tool was calculating distance using the Map's coordinate reference system (CRS).
I had incorrectly assumed it was using the CRS of the elevation surface DEM.
To fix the problem I set the map to a projected CRS. Note, because there is also a Z-plane when doing this sort of work, you first must set the map's Z CRS to none, set the XY CRS to a suitable projected one for the area, then set the equivalent Z CRS.