Last week i was chatting away to my counsellor, and we came up with a novel idea, body doubling works for most of us to get stuff done, makes it easier to get up and start when others are doing a thing.
For me it also works the other way, if everyone else is sitting down, watching TV and winding down, i find it really hard to get up and do the things i'd rather do, like near impossible.
That's not the case for me, I can start doing stuff while talking with someone that is sitting, watching TV, or whatever.
I think having someone near your serves two purposes:
It helps your brain produce happiness juice (dopamine), that makes doing stuff easier.
They act as an anchor, helping you stay at one place and focus on what you should be doing, like a physical reminder.
If other people negatively impact your ability to get things done, I would suggest looking into it. Maybe you are subconsciously copying them, or you feel same shame doing stuff while others are not. I am not trying to invalidate your experience, just suggesting that it's possible you can gain a better understanding of it if you dive deeper.
I'm in middle management so I get my own office. I never use it because being alone in a quiet office makes me lose track of time. I perform better on the noisy platform with all the other colleagues and it doesn't matter whether they are working or just chatting or taking a break. It's just the presence of other people that keeps me picking myself up.