$$\Delta G = -nFE$$
My textbook says that we can measure that this $\Delta G$ is measured when the work is done reversibly. But my confusion is how will we work reversibly when we have an electrochemical cell? And what guarantee do we have that while measuring $\Delta G$, E will remain constant? Isn't it possible that after 0.25 moles of electrons have reacted, E would change because it depends on concentration.