Confusion about the relation between gibbs free energy and electromotive force $$\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.
What that means is that $\Delta G$ is the maximum work available and therefore is only a thermodynamic limit. That's why $E$ is measured with a voltmeter where no current is flowing (actually extremely low current, i.e. the voltmeter has very high impedance). An analogy would be measuring gas pressure in a pressurized vessel, only in e-chem this is "electron pressure". Once you do work with an e-chem cell, the current will encounter many resistances which translate into voltage drop and in turn are energy losses and E will change.