Entanglement evolution across defects in critical anisotropic Heisenberg chains