Quantum phase transition in a driven Tavis–Cummings model