I think you misunderstood the whole theoretical concept of time travel in the movie. The mere fact that the Avengers traveled back in time created an alternate timeline. When they went back to the 70s to take the Tesseract there, that also created a new timeline. But they made it clear that going back in time doesn't alter their timeline. Otherwise, removing the Tesseract from the timeline should have restored everyone killed by the snap since there was no space stone to complete the gauntlet.
What the Ancient One was saying was not that returning the Infinity Stones cures the timeline and prevents the split. She specifically said that removing the stone left the timeline defenseless. Returning the stone is a way to prevent that timeline from being destroyed as well. Some have interpreted that as saying that the stones were essential for the life of a timeline. I interpreted it more simply - the time stone was needed to prevent the coming of Dormammu and removing it would have left the timeline conquered.