Phonon-induced transition between entangled and nonentangled phases in constantly driven quantum dot-cavity systems