When you push a huge rock and it does not move, no mechanical work is done on the rock because work depends on displacement of the object in the direction of the force.
However, the energy you spend is not lost. It is converted into internal energy in your muscles, causing them to heat up and making you feel tired. Some energy is also lost as heat due to friction in your body.
