ggplot2::theme(legend.location = "plot") will override the default legend.location = "panel" and center on the full plot area. ggplot2::theme(legend.justification ...) can be used to manually shift the legend position.
ggplot2::theme(legend.location = "plot")
legend.location = "panel"
ggplot2::theme(legend.justification ...)