Except there was consensus that trump was fine to can her for not doing her job.
She is free to act on her beliefs and trump is free to can her
She wasn't acting on her "beliefs" though. She was acting on her professional understanding of the law and upholding the constitution according to her oath of office.