Technically, we don't see the deaths of Cordelia or Joyce. We are front row centre for the death of Fred / introduction of Illyria and for the death of Jenny.
Cordelia dies with the introduction of Jasmine, but the plot is so bad at this point that we are just ready to have her end and we can't really be sure if she is dead or alive. Even with no warning, I was quite prepared for the call from the hospital in "You're Welcome". The saddest thing at this point in Season 4 is the writing quality.
Jenny is dispatched quickly - there is a brief chase scene, Angelus catches up with her and snaps her neck. Although it was the first death of what was becoming a major character and Giles' love interest, she had not been there long enough and more importantly although she was useful to the scoobies, I felt no real connection. The shock of it and the redefinition of the basic premise - showing that anyone could die, even someone with some importance, made it more spectacular than it was. But I didn't feel it on a personal level so it wasn't sad.
The sadness about Joyce's death was not for her, only those left behind. The Body is a gripping story in that there is no magic resurrection, just a reasonably accurate depiction of what happens when you arrive home to find someone dead. There had been a foreshadowing in previous episodes that Joyce was not in good health. The change in Buffy is more important - she drops out of school to take care of Dawn and the precarious finances and the effect on her and the other scoobies is more important than Joyce.
But the death of Fred is unexpected - the first hint we get is when she starts singing in the presence of Lorne. We see a subsequent degradation that lasts for most of the episode and while we are hoping and expecting to see some kind of reversion to normal, the health problem continues to advance until there is nothing left. Fred is in the presence of Wesley, who loves her and is with her until the end. And we share his hope that this will reverse somehow, but Joss doesn't let it happen. This is the saddest death because we are forced to watch it happen and Fred is a well-loved character.