I disagree that she has to die in CTW series. Simply put, at the opening of ROTS when Obi Wan and Anakin are flying over Coruscant, because Ahsoka is not a good pilot she could have been sent to another planet to lead troops. This can be shown in the series finale of CTW. She is THEN killed by order 66. They only showed a handful of Jedi dying in that montage, there are literally hundreds of Jedi not shown. Did they ALL live? No, all but a handful were killed. Ahsoka was one of those killed and not shown. At that point, Anakin no longer cares about her anyway. DONE!
I don't think you understand exactly what lengths Palpatine was willing to go to keep Anakin going down the path to the Dark Side. Ahsoka's death would push Anakin further down that path. This would also explain his desire for the ability to save people from death besides the death of his mother.
Dying in Order 66 would be fine, but she is close to Anakin and her death would serve the purpose that the Prequel Trilogy set forth- the fall of Anakin Skywalker.