Cosmo’s fate in Sonic X is addressed in episode 77.
Watching that episode gives the clearest answer to what happens to her.