I use the clear weather preset often for testing purposes to allow control of temperature/wind/etc.. I just noticed something recently about the temperature vs altitude model that may have previously been masked by the issues with the pressure vs altitude model.
I found that the temperature profile appears to be based on height above ground level rather than height above mean sea level, while the pressure profile is based on the height above mean sea level.
See the linked video (https://1drv.ms/v/s!Ajsy7Ey4_8uF0AAd8sd_wW7O2oJj?e=PAIvOV), which is a climb to altitude using the clear weather preset at the default ISA conditions. For example, about 8:04 into the video, the airplane is at 20,003 ft AGL and 21,082 ft AMSL. The air pressure is 445 hpa and the air temperature is -24.9 C. The pressure corresponds to the height AMSL (21,082 ft), and the temperature corresponds closest to the height AGL (20,003 ft). Also, it never seemed to get to the troposphere and above temperature of -56.5 C. Conducting tests over the ocean (where AGL = AMSL) it did.
Although the altitudes for this example are not too different, so the temperature difference is only about 2 deg C (i.e., it is at ISA+2 C rather than at ISA), the difference can be greater depending on the height of the terrain. A bit later on in the same flight, for example, the temperature was ISA+5 C rather than ISA.
For reference, here is the standard atmosphere table: Screenshot (630).png