Assume you import $1 of goods, which are consumed. Then the GDP reflects $1 consumption (either private or government) minus $1 imports, for a net zero.
The goods may not be consumed immediately, in which case GDP counts $1 inventories minus $1 imports, still net zero.
The thing to remember is that GDP is domestic product, so anything produced abroad is irrelevant.