Correct.
And the balance between climb or not climb varies with your weight.
(Also, as a seperate issue, a heavier aircraft can't climb as high, either, so if the mission is so long that it's a case of 'get as high as you can' then again the light aircraft has a higher optimum altitude, simply because it can get to it)