Is this a counterexample to ΔU = 0 J for isothermal processes?
The situation you cite calls for the use of the more general form of the first law of thermodynamics (which I assume your textbook provides), given by $$\Delta U+\Delta (KE)+\Delta (PE)=q+w$$where KE is the organized kinetic energy of the system and PE is the potential energy.  Applying this to the problem at hand gives $$\Delta (PE)=w$$and the change in internal energy is zero.  So the thing that was wrong with your approach was not using the proper form of the first law.