Calculating pace from a FIT file

I'm using C# Fit SDK to decode .Fit file.

After decoding it, I get all RecordMsg, sort them by Timestamp. (Running activity)

I'm calculating the pace with the following code:

// speed = 1.987
float? speed = currentRecord?.GetEnhancedSpeed();
double pace = 0;

if(speed.HasValue && speed.Value > 0)
{
   pace = 60 / (sped.Value * 3.6);
}

// then pace = 8.388

I tried to compare my results with these from Garmin connect (WEB and mobile) but i did not get the same results. There is some deviations.

In the example above I calculated the pace is 8.38 for that time, but the web site shows 8.23 witch is notable difference.

I''ve checked even this website https://www.convert-me.com/en/convert/speed/m_sec/m_sec-to-minperkm_1.html?u=m_sec&v=1.987 and it seems my formula is ok.

I'm wondering what's wrong in my calculations and how Garmin Connect calculates the pace?

Here is a link to the activity: https://connect.garmin.com/modern/activity/12027002954.