Whether your current jμ is conserved off-shell depends on your definition of jμ. If you define it via the Dirac and other charged fields, it will only be conserved assuming the equations of motion.
However, if you define jμ via
jμ=∂νFμν,
i.e. as a function of the electromagnetic field and its derivatives, then
∂μjμ=0 holds tautologically because it is
∂μjμ=∂μ∂νFμν=0
which vanishes because the
μν-symmetric second derivatives are applied to a
μν-antisymmetric field strength tensor. The possibility to make the local conservation law tautological is indeed linked to the existence of a gauge symmetry. Why? Because it's the equation of motion one may derive from variations of the fields that are equivalent to gauge transformations: the vanishing of the variation of the action under such variations is guaranteed even without the equations of motion, by the gauge symmetry, so the corresponding combination of the currents,
∂μjμ, has to vanish identically.
This logic also guarantees that the Dirac and other charged field coupled to electromagnetism will have equations of motion that guarantee the local charge conservation.
An analogous statement exists in the case of the diffeomorphism symmetry:
∇μGμν=0
also holds tautologically for the Einstein tensor
G defined in terms of the metric tensor and its derivatives.
This post has been migrated from (A51.SE)