Formality and Connotation: 掉线 is highly informal and colloquial. It carries a neutral-to-slightly-negative connotation (losing connection is never good), but it's often used humorously. Avoid using it in formal or professional writing; for that, you would use a term like
走神 (zǒushén).