Very good explanation.
Notice, thinhnghiem, Fednis48 speaks of work, which has a specific meaning in physics since it means "energy used to do something useful".
Here there is a constant balance between the work done by gravity and the work done by the magnet. There is no net work, which simply means no energy is being produced. Notice how you can do this with springs and Fednis48's post applies as well. It's just that typical springs don't work as well, they have more loss, and it stops sooner.
When you push a cart with your hand and make it move, you may believe that the force of your hand is causing the motion, but it's actually the energy you are spending in your leg muscles which is propelling the cart. You can understand this better by imagining that you are on a slope and the cart is pushing against you. You must apply a constant force to keep it from pushing you backwards. But nothing moves. This is why I said force can not produce energy. There has to be an energy source, and magnets don't contain that energy source you need.