The workenergy theorem says that if you consider the work done by all forces (including gravity) it will equal the change in the kinetic energy (not total energy). And that's just what happens.
If you consider the work done by all forces except gravity, then the work done will equal ΔK + ΔU. (The work done by gravity is already included in the potential energy term.)
