A guardian ad litem or visitor shall not engage in ex parte communications with any judicial officer involved in the matter for which he or she is appointed during the pendency of the proceeding, except as permitted by court rule or statute for ex parte motions. Ex parte motions shall be heard in open court on the record. The record may be preserved in a manner deemed appropriate by the county where the matter is heard. The court, upon its own motion, or upon the motion of a party, may consider the removal of any guardian ad litem or visitor who violates this section from any pending case or from any court-authorized registry, and if so removed may require forfeiture of any fees for professional services on the pending case.