Additive unit structure of endomorphism rings and invariance of modules