It does, but because you have to divide the energy change by c^2, it is really really hard to detect it, and mostly overwhelmed by other effects of the heating/cooling.
rest mass = all the energies of the mass, not just its thermal energy. So, as it approaches 0 kelvin the thermal energy approaches 0 and the mass approaches its minimal possible energy (its kinetic energy approaches zero), but even at absolute zero, it still has the rest-mass of its fundamental particles (electrons, neutrons and protons) which have mass inherently. In practice, the scale of the mass of the particles massively outweighs the scale of the thermal mass, so while strictly true, it mostly doesn't matter.
So, because the scaling factor is stupid stupid large, changing temperature from anything to absolute zero does lower the mass, which does lower the gravity, but it just doesn't matter.