I am not familiar with R but I think even if nlevels are equal, you still cannot compare bio and batch.
if(nlevels(bio)==nlevels(batch)) {
if(all(bio==batch)) {
stop("Biological conditions and batches are confounded. They cannot both be included in the model, please set at least one of 'adjust_bio' and 'adjust_batch' to 'no.'")
}
}
I am not familiar with R but I think even if nlevels are equal, you still cannot compare bio and batch.