Here's a reprex:
library(patchwork) # version 1.3.2
library(gt) # version 1.1.0
# Works:
wrap_table(gt(head(mtcars))) +
plot_spacer() +
plot_layout(widths = c(2, 1))
# Fails:
wrap_table(gt(head(mtcars)), space = "fixed") +
plot_spacer() +
plot_layout(widths = c(2, 1))
#> Error in `class<-`(unlist(lapply(x, as.unit), recursive = FALSE), c("unit", :
#> attempt to set an attribute on NULL