(a) A defendant shall not be tried, be sentenced, enter a guilty plea, or be subject to revocation of probation or a transfer proceeding if the court determines that the defendant is incompetent.
(b)(1) Any proceeding to determine whether a defendant is incompetent shall not delay a determination of probable cause to believe that the defendant has committed the offense with which he or she is charged or the defendant’s eligibility for pretrial release or detention pursuant to subchapter I of Chapter 23 of Title 16 or subchapter II of Chapter 13 of Title 23.
(2) A defendant who is otherwise entitled to pretrial release shall not be involuntarily confined or taken into custody solely because the issue of the defendant’s competence has been raised and an examination or treatment has been ordered, unless the court determines that the defendant may be committed as an inpatient for a full competence examination pursuant to § 24-531.03(e) or for competence treatment pursuant to § 24-531.05.
(3) If the court orders a full competence examination or competence treatment on an outpatient basis, the court may order the defendant to appear at a designated time and place for the examination or treatment and may make the appearance a condition of the defendant’s pretrial release.
(c) The prosecutor or defense attorney may file any motion in the underlying criminal case, transfer proceeding, or probation revocation at any time while the defendant is incompetent. The court shall hear and decide any issue presented by the motion if the defendant’s presence is not constitutionally required or, as determined by the court, essential for a fair hearing.
(d) Nothing in this chapter shall be construed to prevent the government or any person from petitioning the court for involuntary civil commitment pursuant to subchapter IV of Chapter 5 of Title 21 [§ 21-541 et seq.] or subchapter IV of Chapter 13 of Title 7 [§ 7-1304.01 et seq.].