During an examination under this subchapter, except as otherwise ordered by the court, the defendant shall be maintained under the same custody or status as the defendant was maintained under immediately before the examination began.
Tex. Code Crim. Proc. § 46B.023