This is just a narrated version of this STM32-forum thread.
User MHerr.3 came across a problem, where calculation of temperature from readings of internal temperature sensor of STM32G474VE were relatively close to actual temperature of the chip's body measured by an external thermometer, but the higher the actual temperature rose, the more the internally read out temperature deviated from the actual one. And, unexpectedly, at higher temperatures the indicated temperatures were lower than the actual.
Around one year later, user JGosd.1 posted the solution:
The datasheet for the STM32G474 has been recently (Nov 2021) updated to Rev 6 to show TS_CAL2_TEMP as 130°C, rather than the 110°C it shows in rev5.
As these values enter the formula using which temperature is calculated from ADC readings, it explains the deviation.
As user TDK noted, using the simple temperature coefficient + offset values from Datasheet instead of the factory-calibration values stored in system memory would probably indicate the correct temperature even if with somewhat higher error, as the calibration-temperature parameter does not enter the simple calculation's formula. This would have helped to reveal the root of the problem.
This story highlights the fact that while the DS and RM are the ultimate source of information, they are not infallible, and especially with newer models, copy-paste errors are not unseen.