Treatment of resonances with the dilated electron propagator: The 2P shape resonance in e‐Mg scattering