But when departing from warm destinations like egypt, the quantity can change after an hour or two at cruise due to this problem...
Yes the qty, or volume, will decrease as the fuel cools down, but the weight will stay the same. The indications on the flight deck are in kilos, and there is a densiometer in the fuel tank that adjusts the qty in litres that is measured to give you a constant weight. (or linearly reducing weight as you are flying!)