I think he wanted to leave. I'm not sure. I know he agreed to extend his stay by 6 months so that Casey would have a bond with Ellen Dolan's Margo the way he had with HBS, otherwise they knew viewers wouldn't have as much emotional involvement in Margo pulling his plug.
I think they could have waited longer to recast Lily, but I also think that the changes were just too abrupt in Lily even with more time. Things like telling sending a letter to tell Hal that Barbara had known Adam's paternity - that was pure spite. Lily at worst would have told Hal in anger, in a spur of the moment action. Frannie was basically still Frannie, and Julianne Moore had not even really had that much of a role as Frannie in her last year on the show. She'd split her scenes between Frannie and Sabrina, and Frannie left town a lot.
I was reading an old SOD from 1990 about the nastiest thing your character has done. Liz Hubbard said during the John/Susan affair, she wanted to make Susan fall off the wagon, but the show wouldn't let her. While I respect them for that choice (later regimes would have loved it), I have to admit it would have been interesting to see.