Join elements of each tag by commas, put resulting strings into an array with the lab ID as the first element, and pipe it to the @tsv
filter like so:
keys_unsorted[] as $id | [$id, (.[$id].tags[] | join(","))] | @tsv
Online demo
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…