(a) The transfer hearing must be held before a jury unless a waiver of trial by jury is made in writing under oath by the resident, the parent if the resident is a minor, or the resident's guardian of the person.
(b) Notwithstanding the executed waiver, a jury shall determine the issue of the case if the resident, the parent, the guardian of the person, or the resident's legal representative demands a jury trial at any time before the hearing's determination is made.