The Church knows that all of its teachers sin, and it doesn't inquire as to what they do in their private time.
But, when the teacher went public, she was fired immediately...again, because the issue was not what she was doing privately, it was that what she was doing publicly was seen as advocating against Catholic teaching. I don't think it is unreasonable for a religious organization to require its teachers to not be two-faced about their religious beliefs.