# "Correct" gauge for Chern-Simons terms in 5d?

Consider 5d Einstein-Maxwell-Chern-Simons gravity with action $$S=\frac{1}{16\pi G}\int d^5x\sqrt{-g}\left[R-\frac{1}{4}F_{\mu\nu}F^{\mu\nu}-\frac{1}{12\sqrt{3}}\frac{\epsilon^{\mu\nu\rho\sigma\lambda}}{\sqrt{-g}}F_{\mu\nu}F_{\rho\sigma}A_\lambda\right],$$ where $$g_{\mu\nu}$$ is the metric, $$R$$ is the Ricci scalar, $$A_\mu$$ is an (abelian $$U(1)$$) gauge field, $$F_{\mu\nu}$$ is the field strength of $$A_\mu$$, and $$\epsilon$$ is the flat space Levi-Civita for clarity. This comes up, for example, if one wished to study the bosonic sector of minimal supergravity. The standard lore is that under a gauge transformation $$\delta A_\mu=\partial_\mu\Lambda,$$ the action changes by a total derivative (due to the Bianchi identity) $$\delta S\propto\int d^5x\epsilon^{\mu\nu\rho\sigma\lambda}\partial_\lambda(F_{\mu\nu}F_{\rho\sigma}\Lambda),$$ so the equations of motion are invariant. However, the action itself changes (the contribution vanishes at infinity, but there may be a contribution from the horizon). This would be fine, but if I plug in a particular solution, the on-shell action is (classically) the free energy. In particular, for an extremal black hole, the on-shell action is the mass. This would imply that for an electrically charged, extremal black hole, the mass is gauge-dependent. So, what is the "correct" gauge to use to compute the mass/free energy?