Hi @Itch Sun-MSFT , thank you for your answer.
Unfortunately it does not make any real difference. The addition of curly brackets around the entire statement does exclude some results for some searches. The default search with no search parameter input returns zero results with curly brackets instead of all documents of the document library when not using curly brackets.
But when I do a search with some input, i.e. "myspecificterm" as mentioned in the original post, I still get the results from other document libraries in the same site collection and also the results from other site collections. I can see that only one result is missing from the original setup, and that result actually WAS in the correct document library.
One peculiar observation:
I happened to mistype {SearchBoxQuery} as {SearchBoxScript} when trying different things. Obviously {SearchBoxScript} is not a valid query variable, however, I can still give it a value on the test tab and run test query. And then...it works!?. I can use any word within curly brackets EXCEPT for {searchTerms} or {SearchBoxQuery} in my query and assign a value in the test tab with correct results. This won't work on the page itself of course since there is no input to my made up variables.