Consider that the energy density of the dark energy is constant. So as the universe expands, work is done to the dark energy stuff. So this allows a constant energy density as the volume of the universe increases.
The cosmological constant for the dark energy has a negative effective pressure. So work is required to expand it. This is different than a piston expanding from positive internal pressure and doing work => positive internal pressure, expansion does work; negative internal pressure, expansion requires work.