Detention Act Article 23

In the event of the death of a defendant’s grandparent, parent, spouse, child, sibling, or parent of spouse, the defendant may, with approval from senior detention center officials, go home for a visit under escort and then return back to the detention center within 24 hours. The duration of the visit will be counted as days of detention.The regulations in the preceding paragraph shall apply mutatis mutandis to a defendant who needs to go home for a visit due to a major or extraordinary incident. In such a case, the visit shall be reported to the supervisory authority and approved.Regulations governing the criteria for home visit by defendants, eligible individuals, number of visits, duration, expenses, implementation methods, approval procedures, review standards, changes or cancellation after approval, and other requirements shall be prescribed by the Ministry of Justice.
中文原文 羈押法第23條
被告之祖父母、父母、配偶、子女、兄弟姐妹或配偶之父母喪亡時,得經看守所長官核准戒護返家探視,並於二十四小時內回所;其在外期間,予以計算羈押日數。
被告因重大或特殊事故,有返家探視之必要者,經報請監督機關核准後,準用前項之規定。
被告返家探視條件、對象、次數、期間、費用、實施方式、核准程序、審查基準、核准後之變更或取消及其他應遵行事項之辦法,由法務部定之。

English translation for reference only; the Chinese text prevails. Not legal advice.