I kept in touch with two people from one job - they came to our wedding, we went to one of theirs (the other was already married), we are godparents to one of their children. But both just dropped off the radar over 20 years ago. No idea why.
I kept in touch for a couple of years with another person from a different job. But once we'd lost that common bond of the job and the people we worked with, we'd nothing to talk about, so that petered out.
I am in contact with two people from my present job. We don't work together any more - one has now retired, and the other is doing a different role. My present role is fully working from home, so we don't cross paths at work. But we are good friends. We are in contact regularly by WhatsApp, and see each other every few months for dinner. Surprisingly, our old manager (who was a bit of a harridan whilst we worked for her) has also kept in touch with good friend 1 and me, and we have coffee together regularly.
Generally speaking, I think once the mutual "thing" you share, i.e. the job, is no longer a part of your lives, the friendships which can seem very strong at work, just aren't strong enough to continue without it.