It's been a while since I watched the episode, but Wookiepedia has her going back to the World Between Worlds only to re-appear after ROTJ. So she could have either been in that plane, or trapped at Malachor all those years.
But yes, having Ahsoka available in the OT is problematic. I...