I own an i5-1135G7. While I think Josh is right about the temperatures being the same over the long term because both have a TDP of up to 28 W, I think the i7-1165G7 would start to thermal throttle in less time than the i5-1135G7 when turbo boosting. I say this because the i7 has a higher all core turbo frequency of 4.1 GHz instead of 3.8 GHz and will consume more power during turbo boosting (thus generating more heat) than the i5. Of course, you will have slightly higher performance when the CPU is turbo boosting as a result of this trade-off.
From my own testing, when stressing just the CPU the temperatures seem to hit the high 90s (Celsius) just before the CPU drops from turbo boosting down to 28 W.