One of the reasons advanced brewers use the Plato system is that the concentration of a wort in °P does not change with temperature. 100 grams of extract in 1000 grams of wort is always 10 °P whatever the temperature. The density, and thus the specific gravity do, of course, change with temperature. That is why it is necessary to give both the temperature of the sample and of the reference water when specific gravity is reported thus: 1.040 20/20 means that the weight of the sample at 20 °C divided by the weight of an equal volume of water at 20 °C is 1.040.
Worts expand and contract at about the same rate as water. For example, water at 80 °C has density 97.31% of water at 20 °C. 10 °P wort (or, more precisely, a 10 % w/w solution of sucrose) at 80 °C has density 97.35% that of the same solution at 20 °C and for a 20 °P 'wort' the ratio is 97.28%.