Social media vs. academic career
Often, people confuse the protections of the freedom of expression in various forms as protection from judgment by others rather than protections from government (and sometimes employer) sanction. In a free society, you have the right to express the things you want to express on social media (with a few key exceptions), but you do not have the right for that expression to not influence the opinions others have of you.

It seems like you've run into conflicts based on not knowing the boundaries of this principle. Therefore, stepping back from social media seems like good advice from an academic perspective.

You'll have to weigh for yourself whether this advice is too stifling on your personal expression. Some types of expression may be too valuable. However, if you make that choice you have to understand that it comes with consequences.

Social media is not a venue through which you get to have a pulpit without taking a risk. You can reduce the risk through anonymous accounts or by sharing among friends rather than the general public, but things you post on Twitter are no different in principle from things you stand and shout on the street outside your university buildings.

I personally am not opposed to working with people who speak their mind publicly, but there are certain things, such as those that are racist or sexist, those that are homophobic or transphobic, those defending or supporting certain types of crimes, etc, that for the sake of my own expression I will not tolerate. Just as some will choose to use their freedoms to express those opinions, I will use mine to avoid working with them as long as I'm within the law.