A DME equipment with a groundspeed readout will calculate groundspeed by using rate of change of range.

Obviously for the groundspeed readout to be accurate the slant range must be as close as possible to the plan range.

The only time that will occur is at long ranges from the DME.

Similarly, the rate of change of range will only produce an accurate groundspeed when flying directly towards or away from the beacon.