It's important not to focus too much on the temperature and look at the whole child. As you aid in your OP, there are other signs - being mroe tired than normal, not taking the breast or bottle as well.

A sunken and spongy fontanelle Is a sign of dehydration vut some fontanelles are normally sunken. A better sign is nappies - if they are not wetting as many nappies as usual, this is a sign of dehydration. and offering cooled boiled water is not recommended for dehydration in BF children - instead offer more frequent breastfeeds. If the child is dry because thay have gastro, try and offer small, frequent BF as tolerated; if they are on formula (or are BF but have severe gastro) you may need to switch to a lactose-free formula, initially at half strength, and then at full-strength, to rest their gut.

Feet, hands, and foreheads are not good indicators of temperature; the chest is, but remember - don't focus on the temperature. For the OP, finally getting the temperature of 39.5 only confirmed what you had already identified - that your child was unwell. And well done on noticing those signs.