I'm so sorry you've gone through this. I've also been on the receiving end.
But..
I don't think the people who are expecting, in this case, your friends, did anything out of spite. I've been on both ends, lost a baby and also pregnant when my friends lost a baby. It's very hard to know what to do and how to do it. As hard and unfair as it seems, nobody owes anyone an explanation of when they're pregnant / when they are going to announce to the public. The people in this situation may have 'ghosted' as they don't know what to say, or maybe think you need some space?
Being on both ends - as shit as it is, others shouldn't be stopped announcing their news because someone else is going through a loss. This news is the most exciting thing in the world to them, and as cold as this sounds, is more at the forefront of their minds then tiptoeing around others. Yes there are better ways to do so and it is kind to maybe tell the person before hand if they've gone through a loss.
In my case, I didn't want people to message me separately, or come and see me separately. I didn't want any special treatment as it made me feel isolated from everybody else. Like everyone's tiptoeing around wondering when to message or tell me. What will I say. How will I react.
People have losses and people have babies.
People have divorces and people have marriages.
People get sacked and people get promotions. It's all a part of life. But holding onto so much anger over another persons happiness will just made you even more resentful.
All they did was announce their happy news. As I said, it's hard to know what the couple going through a loss want and it's such a gamble.