One reads this often, but I think it is a misconception. Rather, neutrons decay within the atom, but the electron-antineutrino immediately fuse with one of the protons in the nucleus forming a neutron! Due to mutual repulsion*, the protons are mainly on the surface of the nucleus and, thus, in a good position to ensure that the electron does not escape. In neutron loaded atoms, the proton skin is stretch thin so electrons can escape: beta decay.
[*The strong force, acting between neutrons and protons, keeps the protons from flying off the surface of the nucleus due to mutual repulsion.]