Just be sure you do the hug with your carry side arm low around the person you are hugging. That will leave them hugging you up around your shoulder on that side. Then you just have to position your body so your weapon does not press against them.
It is awkward sometimes going for the low hug, but change your approach and do preemptive hugs so that you are the initiator and come at them with your carry side arm low.
Of course, you will get the bad rep of being the one who is always wanting to hug.