I just have arcade code but it gives you the math.
Current point distance from design (meters)
# convert from Web Mercator to WGS84 - if you need it
var originShift = 2.0 * PI * 6378137.0 / 2.0;
var lon = (Geometry($feature).x / originShift) * 180.0;
var lat = (Geometry($feature).y / originShift) * 180.0;
lat = 180.0 / PI * (2.0 * Atan( Exp( lat * PI / 180.0)) - PI / 2.0);
return Round(Acos(Sin(lat * PI / 180)*Sin($feature.DesignLat * PI / 180) + Cos(lat * PI / 180)*Cos($feature.DesignLat * PI / 180)*Cos(($feature.DesignLong * PI / 180)-(lon * PI / 180))) * 6371000,2)
Other idea is make then XYEvent layers then just let Arc do the math.