Taking notes is the superweapon for mitigating distractions in my experience. It doesnt eliminate the immediate impact, but it allows you to get back to a productive state so much more quickly.
As a team leader in a 7 person company, I am not entitled to any degree of dedicated focus time during the work week. Everything is ultimately my responsibility and I have to answer some important questions immediately. Being aware that you are going to be disrupted and building in some mechanisms to deal with this reality is probably the more practical path.
Trying to convince your PMs that distractions are lethal and that developers need to be protected in some anechoic chamber 8 hours a day is never going to fly. It is total fantasy. I personally try to minimize the distractions that I as a developer incur upon other developers, but I cannot change the natures of other team members or artificially inhibit their interactions. People are just going to have to learn to get along and develop boundaries naturally. Don't be afraid to stand up for yourself, but also realize you are almost certainly not a special unicorn and that eventually you will have to interact with your teammates (the ones who don't browse HN) for the business to extract any value out of you.
An additional strategy is to try and decompose your work effort into smaller steps before you begin. Trying to eat the whole elephant in 1 sitting is how you wind up in a lot of these "interrupted" situations to begin with.