Yes, I'm not proficient enough with coding but yesterday night it ocurred to me that perhaps I could try to do it BACKWARDS, instead of having the labcoat as default and then look if the scientist is on a ship to give him the uniform clothes, I could try the other way around. Have the uniform as default and then look if the scientist is doing research to give him the labcoat clothes. Does that make sense?
I'm not good at knowing scopes, triggers and effects yet. And there's no official explanation as to what any of them does but...
[Edit]
In only want the uniform scientist clothes when they're commanding a science ship so if is_researching_area is true in any of those cases I think it would work. Besides the scientists only are either researching or in a ship, unless you hire more than you need and then have them doing nothing in your pool, right?.
I can think this method can act weird when/if you tell a science ship to help research on a planet, so then the scientist on that ship will be actually doing research and thus their clothes would change back but... I think I could live with that if there's nothing better.