Ghosting isn't great, of course it's not but I suspect in most cases the person being ghosted has completely failed to pick up numerous signs that the other person is not happy in the friendship.
This comes up a lot on MN and without fail posters believe that they'd feel so much better if they only knew what had caused the other person to withdraw. In reality it's very unlikely being told why someone doesn't want to be friends with you anymore would make you feel better at all, I mean it's never going to be "your witty conversation, pleasant company and joy de vivre got on my nerves", is it?
It's far more likely the truth could cause immense hurt and even damage your self esteem. How about:
I dread meeting you because you unload all your woes on me and I go home feeling drained.
Or
We no longer have anything in common and I find you very boring.
Or
There have been a number of things you've said or done which made me realise you're not a person I want to be friends with.
^^ those are reasons why I've withdrawn from friendships though I've never actually cut someone off, more a slow fade tbh.
There is no way to stop being friends with someone that doesn't hurt their feelings, we can all try to tell ourselves the hurt is because of how they ended it ie with no explanation but really what's hurting is the rejection. It's horrible, of course it is but people are not obliged to keep being your friend, nor are they obliged to give you an explanation for why they don't want to be.