The temporary custody referred to in sections 29-3803 and 29-3804 shall be only for the purpose of permitting prosecution on the charge or charges contained in one or more untried indictments, informations, or complaints which form the basis of a detainer lodged with the director or for prosecution on any other charge or charges arising out of the same transaction. Except for attendance at court and transportation to or from any place where the prisoner’s presence may be required, the prisoner shall be held in a suitable jail or other facility regularly used for persons awaiting prosecution. However, the prisoner shall not be classified as a pretrial detainee but shall be deemed to remain in custody of the Department of Correctional Services and any escape from temporary custody may be dealt with in the same manner as an escape from the Department of Correctional Services’ facility to which he or she was confined.