Quantum error correction driven entanglement dynamics in the presence of correlated noise