I was an alcoholic pothead musician so most of my friends were alcoholic pothead musicians too.
Without really consciously planning it, I stopped hanging around and they stopped asking me to hang around.
I rediscovered old friends - people who were thrilled I was sober and 'the old me again' and I made lots of new friends where our common bond was not drink or drugs.
It doesn't happen instantly but it will happen exegesis