Simply remove the width setting, allowing patchwork to automatically determine the width and height.
library(ggplot2)
library(patchwork)
g1 <- ggplot() +
geom_point(aes(x = sort(rnorm(100)), y = sort(rnorm(100)))) +
geom_abline(slope = 1, linetype = "dashed") +
coord_fixed()
g2 <- ggplot() +
geom_point(aes(x = sort(rnorm(100)), y = 2 * sort(rnorm(100)))) +
geom_abline(slope = 1, linetype = "dashed") +
coord_fixed()
(g1 + g2)