Any resemblance between "Goodbye, Sarah Jane Smith" and Sladen's real illness was purely coincidental. At the time they wrote and filmed that story, they had no idea that her health was going to take a rapid turn for the worse. She had been through cancer treatment before, but it was in remission at the time. So "Goodbye" was not in any way written to address her real-life illness. As mentioned, they went on to film another half-season after the "Goodbye" storyline -- and it was in the break following that half-season that her cancer returned with a vengeance.
So they simply didn't have time to deal with her illness and death, since it happened so fast. They just cancelled production on the second half of Series 5. As far as the Doctor Who
universe is concerned, Sarah Jane and her friends are still alive and active and saving the Earth from Bannerman Road. We just don't get to see it anymore.