We don't do it at lunchtime. We don't do it during the working day. 5:30pm on a Friday? Let's have a glass of whiskey together.
Somebody joining/leaving, or we haven't been out together for a while? Let's go to the pub after work one evening.
There is a #drinks channel in Slack where people who fancy a drink after work co-ordinate, and several of will grab each other once a week for a couple of pints.
That does not mean we are drunk when coding. As for team dynamics, it means we know each other better and bond more frequently. Not a problem, I think.
The downside is that for people who don't want to engage in this or can't (have to look after family, etc.), it can feel exclusionary, so we spend some time making sure we do things with those people too.