Framework Intel Core i7-1165G7 benchmarks

There is actually a meaning here.
The smaller the transistors, the less amount of power it uses (at least, to my knowledge), and the less heat it generates.

The density is completely irrelevant. You can stack transistors, even layers. It just doesnt make a lot of sense in the end.

And thus, the 7nm will beat 10nm because it generate less heat and use less power, and therefore pound for pound, 7nm wins. And yes, if you put a refrigerator on top of the 10nm, it also wins.