In the following question the OP asked what is meant in chapter 27-4 of Feynman's Lectures on Physics Vol.II by the ambiguity in the location of electromagnetic field energy: Why is there ambiguity of the field energy?
@AccidentalFourierTransform answers the question with an example of how u and S may be redefined and how the location of the energy is ambiguous. It is also mentioned that u and S are contained in $T_{\mu \nu}$ which leads me to believe that their form somehow appears in or is derived from the matter Lagrangian.
My question is: When u and S are redefined, how does that change the E&M Lagrangian? Said differently, what changes in the E&M Lagrangian leave the equations of motion the same (in the absence of gravity) while redefining u and S?
My initial guess was that Feynman was talking about some kind of gauge transformation. However, as Feynman mentioned, the redefinitions would have measurable effects in a full theory of gravity. Therefore, I believe these redefinitions are not gauge transformations.
Thanks in advance for your help!