Cavity-loss-induced Bell-nonlocality sudden death in the Tavis–Cummings model