Suppose we have a mass-spring system in equilibrium as in the above part of the picture(it's a frictionless surface).
Then I attached a weightless rope to the mass from one end and a car from the another end. This car contains fuel(chemical energy). I turn on the car and drive it to the right, so the motor of the car is going to apply force to the right and displace the mass, with the Work done on the mass being equal to: $U=1/2kx^2$.
Now if I cut the rope, the potential energy stored in the mass is going to be converted into a kinetic one, and the mass is going to undergo a simple harmonic motion.
But suppose I want to maintain this present configuration(the part of the picture below), that is, I want to keep the mass at rest away from the equilibrium position, then I will have to keep pressing on the pedal of the car so as to apply a force that continuously counteract and cancel out with the force of the spring. As a result the fuel is continuously being burnt and chemical energy is lost, Although the mass is at rest and no Work is done at all.
My confusion is this: Although there is no Work done at all, this system continuously losses energy.
what is wrong here?
I'm well aware of the fact that there are other energy transfer mechanisms like heat, but assume that the engine of the car is an ideal engine.
Then how this system losses its energy?