If you work remotely, there is a good chance you will be left out. Of course, "interaction" can be done remotely. But many other things cannot. Showing your face every now and then around other people is quite important. Somebody is organising a seminar? Somebody is organising a conference? Somebody is looking for someone to teach a couple of their lessons? If you are the person that never shows up, you will be the person who won't get asked, simply because you have no connection to other people. Who am I going to ask if I want to organise something? The person I have never seen and who I know nothing about, or the person I've met, where I can gauge what they are working on, whether I get along with them, what they are interested in and what their plans and goals are?
I did my dissertation remotely, and to keep up with people, make sure my network was strong, push through the things that sometimes just need you there with a piece of paper and keep everyone happy, I was in the car an awful lot.
It's not a tactic I'd recommend to anyone unless their circumstances were strongly dictating it, and there's definitely stuff lost in the process. And my department wasn't particularly "collegial" - for the places that are, it'll be worse.
I did my Master's work part-time and semi-remotely - I lived and worked in the same geographical area as the University, and it was hard.
I would recommend against it in exceptionally strenuous terms for the PhD. Full-time on-site PhD or don't bother IMO. It just decreases the educational intensity and quality so much not to do that.
"Disclaimer": I'm not in STEM