Here's the problem. Textbooks and instructors often refer to the gravitational potential energy of an object, such as a ball or in your case a cylinder or a molecule. But this is a sloppy practice. These objects do not possess gravitational potential energy. It's the object-Earth
system that possesses the potential energy.
So, as
@A.T. pointed out in Post #2 the internal energy of the cylinder does not increase.
Potential energy is a property of a system. When you increase the height of the cylinder you increase the potential energy of the cylinder-Earth system.