The attenuation constant you've provided is a modal property; is is determined solely by the transverse cross-section of the medium through which a given wave propagates. It can only be applied properly under the assumption that the medium is longitudinally invariant. This could include radiation, but usually doesn't.
S21 (or insertion loss, in a two-port network) on the other hand, measures the degree of voltage and/or power that comes out of port 2 of any (necessarily finite) network given a certain amount into port 1. This is regardless as to what is inside the network.
In simple systems like a waveguide, S21 is roughly proportional to the attenuation constant.