A more general post about "professionalism".
One of the things that gets lost in these discussions is what professionalism means. In my experience, there are two separate issues -- the things you do, and how you go about doing them. The first is often much more cut-and-dried and there's often agreement. The second is more vague, but also more common.
What you do - you can certainly perform some act that's unprofessional. It might be illegal or unethical. An example is the medical student who stole the iPad from the patient that died of cancer. Or students who forge their own evaluations. These types of behaviors are such that, almost regardless of the underlying circumstances, they are completely unacceptable. These types of events are very rare.
How you do it - this is the much more complicated issue. Even if you're "doing the right thing", if you do it in a way that is confrontational, aggressive, or hurtful, that can be considered unprofessional also. The best example in residency is a resident who wants something done for a patient that needs to get done (a scan, for example), after being told it can't happen today becomes belligerent and demands it be done for the patient's clinical need, demands to speak with "higher ups", etc. I've had residents like this. They are convinced they are "in the right" since the patient needed the test. And often, the patient does need the test. But the way they get at getting the test done creates havoc and distress. They often say they were "standing up for the patient's rights" or something similar. The issue is that their motives were fine, but the execution was unprofessional. Eugene Gu's story is a great example of this -- there's nothing wrong with his views (at least as documented on social media), but the way he expressed them apparently crossed a line. (There were apparently concerns about his clinical skills also, but let's not re-litigate that here, there's a whole thread buried somewhere that can be ressurected).
So, to the OP, you say that this whole professionalism thing was manufactured because people "disliked you for personal reasons". I'm worried that your actions, even if factually "professional", were executed in a way that was interpreted as unprofessional. Should that be the case, the same problem will occur again (in almost any field) unless you address it.
Best of luck