(1) No person who lacks substantial mental capacity to understand the proceedings or assist in his or her own defense may be tried, convicted or sentenced for the commission of an offense so long as the incapacity endures.(2) A defendant shall not be determined incompetent to proceed solely because medication has been or is being administered to restore or maintain competency.(3) The fact that a defendant is not competent to proceed does not preclude any legal objection to the prosecution under s. 971.31 which is susceptible of fair determination prior to trial and without the personal participation of the defendant.(4) The fact that a defendant is not competent to proceed does not preclude a hearing under s. 968.38(4) or (5) unless the probable cause finding required to be made at the hearing cannot be fairly made without the personal participation of the defendant.