What I've heard, Jennifer wasn't told that she was going to be dumped until the filming of "The Gift" was about to start.
Correct information or not, she got the message rather late because Kim was the one who was chosen to be dumped after season 3, but those in charge changed their minds after a silly inside poll in a glossy magazine.
Show business is a business & it's a business in which the talent is unionized. Producers & studios work under strict SAG guidelines in the treatment of actors.
Jennifer, like the rest of the cast, had a 3 season contract. She would have known long before filming that her contract was not renewed along with the rest of the cast.
Plus, her agent would have had to negotiate with TPTB for her salary for her guest starring roles in Scorpion 2 & The Gift.