Society has loads of edge cases like this.
I broke my arm a few years back, went to hospital, and a surgeon put some titanium plates and screws in. The orthopaedic surgeon spends a lot of the day standing, they repeat similar work every day with minor variations, they can't work remotely, they're exposed to hazardous chemicals, they have face-to-face interactions with customers, they earn money by working rather than from investments or inheritance, they're union members, they get paid overtime, they wear blue employer-issued workwear, many do shift work, and they literally put in screws for a living.
And yet nobody would say surgeons are blue collar workers.
Maybe because of the $500k salaries, or the air-conditioned hospitals they work in, or because their status is equivalent to doctors who are pretty much the definition of upper-middle-class tie-wearing knowledge workers.