A lightweight bike is ~6kg, what you gain from not having the impact of each step and being able to control your heart rate while keeping your cadence optimal via gears IMO more than compensates for the extra weight.
Standing takes a lot more energy than sitting - remember, the challenge is coming down again as well on each lap, but even on the uphill not having to support full bodyweight is an advantage, instead you just push with the effort you require on the pedals.
And of course if you are in the wrong gear a bicycle will be ineffective... that's why you choose the right gear?