Thanks to Billy Kerr who answered the question on Stack Exchange.
UPDATE 30/07/2025: You don't even have to use the svglite package to edit textLength :)
Code for using the svglite package is:
Plot figure
library(svglite)
svglite("test.svg")
plot(yourgraph)
dev.off()
With ggsave()
ggsave("test.svg", width = 20, height = 18, units = "cm")