You can reference a spilled range in a formula. That way, whenever the spilled range changes size, your referencing formula automatically includes all the data.

Above we have a filter formula that is spilling down four rows.

Above we have a Unique formula that is referencing the spilled range. Note the # in the reference. This means the Unique formula will reference all the data in the spilled range. If the size of the spilled data from the Filter formula changes, the unique formula will automatically adjust.