=REDUCE(, A2:A32, LAMBDA(dates,d, IF(AND(ISBLANK(d), TAKE(dates, -1) = ""), dates, VSTACK(dates, IF(ISBLANK(d), "", d)))))