When any court in this State is about to order the sale of real estate in which a ward has an estate of homestead or any other interest, the representative may assent in writing on behalf of the sale of the homestead or other interest of the ward pursuant to the direction of the court by which the representative was appointed. On the filing of the assent in the court in which the proceeding for the sale of the real estate is pending, that court may order the sale of the real estate free of the homestead or other interest of the ward, but the court shall ascertain the value of the homestead or other interest and order that a sum of money equal to the gross value of the homestead or other interest be paid from the proceeds of the sale to the representative, less any portion of the costs equitably chargeable to the ward's interest.
755 ILCS 5/20-22