Like all the regulars, she had a contract for X out of 13 episodes. In her case, at least 7 out of 13. At the end of that 13 episode production cycle, the studio could opt to renew the contract for another 13 episodes, or release the actor from the contract. In Whitney's case, she was released.
The studio couldn't release the actor before then without eating their salary for that production cycle, which Star Trek clearly could not afford to do.