Ehlers transformations as EM duality in the double copy