Currently the list of OSM relations that will be imported for the Wikidata ID mapping is limited to these that have one of the following values on the OSM type tag:
multipolygon route route_master restriction boundary public_transport destination_sign waterway enforcement connectivity
De-facto there's also the site{1} value that's used for this tag and it would make sense to import these relations as well to cover the shapes and lines associated with Wikidata QIDs.
Note, that the value is not officially supported yet but the usage seem to have increased over time[2] and the only argument is, that it's not supported by a lot of consumers. So that might be chicken or egg issue.
Taken from a this discussion in de.wikipedia {3].
[1} https://wiki.openstreetmap.org/w/index.php?title=Relation:site
[2] https://taginfo.openstreetmap.org/tags/?key=type&value=site
[3] https://de.wikipedia.org/wiki/Wikipedia_Diskussion:Technische_W%C3%BCnsche/Topw%C3%BCnsche/Bessere_Unterst%C3%BCtzung_von_Geoinformationen/Kartographer#Nur_alte_QIDs?