Hmm I never really thought about it, either. Most of the regulars missed some episodes in Season 2. I assume that many of them were contracted for less than the full 22, which was a fairly common practice, especially with such a large cast for the era. Lucy's absence is more noticeable since we spend so much time in the sheriff's station. Also, both of her absences fill some plot function, so I never gave them too much thought. The first absence fuels the little storyline about Andy's anxiety over the baby: first, he calls the number in Tacoma for "Gwen" and finds out it's "Adam's Abortion Clinic" (I don't believe this beat is ever addressed again after that). Then, a couple of episodes later, we get to meet Gwen, and Andy passes out when he sees the baby. The Episode 18 absence provides an excuse for Andy and Dick and Nicky to spend time together at the diner, which they wouldn't have done if Lucy were around.
If IMDb is correct about the shooting dates for Don't Tell Mom the Babysitter's Dead, that shoot wouldn't have interfered with any of the episodes she missed (DTMtBD apparently finished shooting in July, and the first draft of the Episode 13 script wasn't completed until late August). Likewise, I think that Simpsons was recorded later (it aired in May 1992), and in any event, animation recordings are pretty flexible (and quick), and I doubt she would have missed days on the show for it. Simpsons guest stars often came in separate from the main cast if they couldn't make the main recording. (For example, Lawrence Tierney, who had a role of comparable size to Kimmy in another Simpsons episode, recorded his lines in 40 minutes during the lunch hour.)
I do note that all the pages in the Episode 18 script mentioning Lucy's absence, as well as the Dick/Andy/Nicky scene, are a product of the latest script revision. So it's possible that a change was made late-ish in the writing process to eliminate her from the script for practical reasons.