Nonlinearity-induced entanglement stability in a qubit-oscillator system