Been there, done that. It is true that you end up feeling the need for some socialisation and escape from your own 4 walls. In particular when I changed jobs from one WFH but with multiple teams meetings and phone calls all day to one that was much calmer, slower paced and part of a much smaller team. There were times I realised I had literally gone 2 or sometimes even 3 days and not spoken to anyone other than a couple of work related phone calls. Particularly noticed it in Winter with the darker nights and not getting out walking the dog or similar as much.
So yep, a couple of pints just to socialise was my excuse but that soon slipped from an evening stroll for 2 or 3 pints a couple of times a week to spending all night every night in the pub. Waking up not feeling great, dragging myself into the spare room and working bleary eyed in my scruffy clothes until it was time to log off and go to the pub again.
I had to have a big reset and sort a routine. I now get up at least an hour before work, try and take the dog out and/or go for a run. Shower and get dressed in some "proper" clothes including sometimes my branded work shirts if I have Teams meetings that day. Get in a proper frame of mind for sitting down starting work. I take regular 15 minute breaks throughout the day to take the dog out and get some fresh air, during those I try not to be staring at my phone whether it's social media or emails. Once or twice a week I try to catch up with a mate for a quick lunch who works similarly, we'll go to a local cafe or something.
It means that I actually tend to work later factoring in the breaks but I'm much more focused during the working periods, by the time I then finish it's later in the evening so time to make some dinner and get settled rather than finishing at 4pm and heading straight to the pub for the teatime lads drink.
Sorry, slightly OT from what the OP was asking but hopefully useful advise for others!