Complete replacement of magnetic flux in a flux rope during a coronal mass ejection - Nature Astronomy