Later I started being more assertive about my time.
Meeting request in the middle of my core work hours? Decline as busy, suggest to move it to a lunch meeting or offer to call the person after working hours (Everyone chooses lunch meeting instead of after hours).
People tapping me on the shoulder to ask a question while I'm wearing headphones? Before they can speak, I politely say that I'm in the middle of something I need to finish and ask if it's urgent. It's rarely urgent, but people quickly learn that it doesn't pay off to interrupt me.
Constant deluge of Slack messages? I set a status that I was busy but would be available to chat during certain hours. When I'm pinged, I quickly respond that I'm in the middle of something but I'll get back to them later.
The key was to realize that taking charge of my own time didn't have the negative consequences I thought it would. In my mind, I thought declining people's meeting invites or refusing to prioritize other people's demands would end my career, so I let people walk all over my schedule. Reality couldn't have been further from the truth. Nearly everyone was very understanding and very few people interpreted my responses as rude. Obviously you need to be polite and professional, no matter how aggravating the interruptions are.
Carving out dedicated meeting and socializing time was also important. It's unlikely that I'm going to sit in one place for 8 straight hours anyway, so allocating two blocks of time each day for meetings and catching up was helpful. Making it predictable and communicating it to others made it easy for everyone else to understand. I even marked it on my shared calendar.