Work done by gravity
Work Wgravity done by gravity depends only on the initial position h0 and final position hf of the object
Wgravity = m g h0 - m g hf = PE0 - PEf
There is no net work if you start out and end up at the same point: No net work along a closed path.