Yes, it does. I hope this discussion will be helpful: https://www.quora.com/Would-the-Photoelectric-Work-Function-be-affected-by-the-temperature-of-the-metal-or-the-initial-kinetic-energy-of-the-electrons-If-it-does-why-does-it
I apologise as my last post (#4) was not the appropriate explanation.
If I haven't mistaken, your question is that, initially there is a positive work, and finally a negative work, which are equal to each other. So the mechanical energy should be constant.
Actually, it is constant.
If you go...
At first, consider the following example:
Suppose, you have thrown a ball(mass=##m##) from ground to the sky with velocity ##v##;
So the ball has a kinetic energy = ##\frac{1}{2}mv^2## ;
After that, the net force on the ball is just the gravitational force which is opposite to the displacement...