Ehh really depends on your boss. And honestly it depends on you also. If either of you can't separate work from personal time then you really shouldn't be hanging out. But for most of the bosses I've had, some lighthearted social time outside of work was perfectly fine.
I have met enough players and DMs with whom I disagreed or got their bad side enough time to thank the fact that I was happy I wouldnt meet them at work the next day.
Its the same thing as not working with your lover. If there is something wrong or bad happening at home, you dont wanna keep it going at work afterwards.
But to answer you, yeah I can. Ill torture kobolds instead. /s
That kinda goes back to what I said about you also needing to factor in how well you and the other people can separate the two environments. If that is a personal limitation, then it's best to understand it and manage it as you suggest.
Personally I have no issue keeping work at work and home at home. There have been many times where my coworkers and I have had a tense week at work, full of disagreement and debates, only to hang out like bros on the weekend. There's one coworkers who can't make that separation, and that's fine. They've realized it and I'll respect that boundary.
I know how I can do it. And Im not going to risk finding out my boss cannot do it well.
I have had good and bad bosses. Flying under the radar of bad ones is how you do it. And Im no lt gonna risk turning a good boss into a bad for a game, no matter if that game was the best ever.