Focus comes at a cost.
Not only at the cost of dealing with your own distractions, such as internet or wanting to do something else at the cost of what you should be doing; however it also comes with distractions from family.
I am talking about family because friends are the people we choose, and they more or less understand us.
But what I also know is that once you communicate your boundaries to them, they respect it for some time. Until they want to encroach it again 🙂
So just relax, communicate your boundaries again and respect them. Because that is how you will teach others to respect your boundaries.