This is not surprising, given 'G4 are built in the same 45nm technology than the 'H7, enabling very high integration i.e. (sometimes overly) complex peripherals on a small silicon area, resulting in relatively small unit cost.
Unfortunately, ST does not reveal the underlying mechanism for this limitation. It might be reduced flash retention, diffusion-related issues, electromigration, or any other effect.
While the limitation is not that dramatic as with 'H7 and lifetime even at relatively high temperatures achieves 10 years (contrary to 2 years with 'H7), this is something to be kept in mind when designing with this family.