I wish I could say it gets better man. The only advice I can offer is to keep doing what keeps you functional. I cannot count the number of times I had a breakdown because I forced myself to be in a situation I could not handle being in. If stepping away for a while and playing some piano works then it works. Its better than the humiliation of a crashout. If there is something you can do while in a room of people that is soothing I would recommend doing that as well. Personally I like to fidget with pens or metal spheres, I find the weight of them to be pleasant.
Edit: I almost forgot the best advice possible. Find a safe person. Connect with the people who normally attend family gatherings but connect with them in a more 1 on 1 setting. Text works for this just fine imo. Find someone who understands your struggle and go out of your way to hang out with them at these gatherings. I got lucky that one of my cousins is autistic so we just talk at these things and it keeps most people away from us bc we look busy. Its a great system