The following example code produces an htmlwidget that does not show correctly in VSCode WebView:
library(knitr)
library(kableExtra)
dt <- mtcars[1:5, 1:4]
# HTML table
kable(dt, format = "html", caption = "Demo Table") %>%
kable_styling(bootstrap_options = "striped",
full_width = F) %>%
add_header_above(c(" ", "Group 1" = 2, "Group 2[note]" = 2)) %>%
add_footnote(c("table footnote"))

The correct should look like

The following example code produces an htmlwidget that does not show correctly in VSCode WebView:
The correct should look like