Consider a spring with spring constant $k$ attached at one end to a wall. When an external force stretches it by distance $l$ in the positive direction the force does work $\frac{1}{2}kl^2$ and that energy is stored in the spring as elastic potential energy.
Let the stretching take place uniformly over a time $t$ for definiteness.
If this operation is viewed by an observer moving at velocity $v$ with respect to the lab, the starting and ending position of the stretching operation will appear to be different, say $0$ and $l - vt$, but the average force exerted on the spring would remain $\frac{1}{2}kl$, which seems to make the work done (and energy stored in the spring) $$ W = \left(\frac{1}{2}kl\right) \cdot (l - vt) \;.$$
How is this (potentially vast) difference reconciled?