Did Garmin Connect think that it was 40 degress? It is the temperature you see in the map that is used for the Toasty badge. The Toasty badge can only be earned once.
Post a link to the activity or a screenshot of the map with the temperature visible.
Looks ok. It could be that it really isn't 40 degress, but 39.9 degress (or 39.5-39.9). The value in the app is displayed without any decimals. Check in Garmin Connect Web to get a more accurate value: https://connect.garmin.com/modern (it is displayed with 1 decimal in the web)