gauge transformations and gravity

imagine a situation where the gravitational field is sourced by the Maxwell-field: why does the gravitational field not change if one performs gauge transformations on the vector potential \(A^\mu\)?