I must have made an error in my variables (?locationOfDiscovery / ?country) the following version of this code worked fine :
q_list <- c(df3$QID_items)
qid_list <- c(paste0("wd:",q_list, collapse = " "))
query_sparql <- paste0("SELECT
?item ?locationOfDiscovery
WHERE {
VALUES ?item {", qid_list,"}
OPTIONAL { ?item wdt:P189 ?locationOfDiscovery. }
SERVICE wikibase:label { bd:serviceParam wikibase:language 'en'. }
}")