Conversions of Kinetic energy to and from potential energy in vacuum converts with very little loss. If you throw a rock up against gravity in a vacuum, that rock will reach a potential energy that is almost exactly equal to the initial kinetic energy. When the rock reaches its peak and comes back down, its kinetic energy will be almost exactly the same when it reaches the original altitude.