Assuming you are after the percentage of each count relative to their group instead of 100%, you need to include the groups in denominator
of tbl_hierarchical()
.
tbl_list <- lapply(group_vars, function(var) {
gtsummary::tbl_hierarchical(
data = adsl,
denominator = adsl %>%
select(USUBJID, all_of(var)),
id = USUBJID,
by = .data[[var]],
variables = c(SITEGR1, SITEID)
)
})