Altimeter following temperature

Same training (8km easy pace), same roads, 2 different days (last saturday and sunday):

First one was a cloudy day at sunrise, so no sun to warm up the watch, second one was a sunny day.

Second one is quite near to real altimetry (although my wife's 965 is much more accurate), even if the 2 degree increase after 5km takes away a few meters from the real altitude.

Why doesn't Garmin develop a better algorithm to decouple the altitude measurement from the temperature value?

In winter this problem is even more emphasized.