It is because “you have to overcome your own mass even on the flat” that running is also harder for heavier people on the flat.
It is not debatable that raising more mass the same distance requires more energy, stored as potential energy once the top of the climb is reached.
In the real world, that is. On the mill, it gets weird, because after an hour of 1% incline you finish at the same height at which you started...so you probably have to break the effort down into individual strides. It’s the same mechanism as after running for an hour at 6mph, you have translated exactly zero meters, and yet expended much energy to have done so.
It is precisely because you are lifting mass with each stride that an incline is more difficult than a flat, and why a steeper incline is harder than a shallower one, regardless of your body mass.