Textbooks claim that the difference between GDP and GNP (or GNI) is about geography vs citizenship--is this correct? Many textbooks claim that the difference between GDP and GNP is about geography vs citizenship. For example, Colander:

GDP is output produced within a country’s borders; GNP is output produced by a country’s citizens.

So, according to the above, if for all of 2017 through 2020, Hans the German citizen lived in the US and worked for Walmart, then his 2020 wages would count towards 2020 US GDP and German GNP (but not US GNP or German GDP).
But from my reading of the UN System of National Accounts (2008), this seems to be incorrect:

An institutional unit is said to be resident within the economic territory of a country when it maintains a centre of predominant economic interest in that territory, that is, when it engages, or intends to engage, in economic activities or transactions on a significant scale either indefinitely or over a long period of time, usually interpreted as one year.

So, by my reading, Hans should be counted as a US resident in 2020 and his 2020 Walmart wages should instead count towards US GDP.
Am I correct and are the textbooks wrong? (Or have I perhaps misinterpreted them?)

More examples of textbooks making the above claim.
Baumol and Blinder:

There is another concept, called gross national product, which counts the goods and services produced by all Americans, regardless of where they work. For consistency, the outputs produced by foreigners working in the United States are not included in GNP.

Cowen and Tabarrok:

Gross national product (GNP) is very similar to GDP but GNP measures what is produced by the labor and property supplied by U.S. permanent residents wherever in the world that labor or capital is located, rather than what is produced within the U.S. border.

Fischer and Dornbusch:

There is a distinction between GNP and gross domestic product, or GDP. GDP
is the value of final goods produced within the country. What is the difference
between GNP and GDP? Part of GNP is earned abroad. For instance, the
income of an American citizen working in Japan is part of U.S. GNP. But it is
not part of U.S. GDP because it is not earned in the United States.

O'Sullivan and Sheffrin:

The distinction between what they produce within their borders, GDP, and what their citizens earn, GNP, is not that important to most countries.
Residency is a complex definition. For example, the Council for Science and Technology of my country supports many graduate students abroad every year. Those guys stay abroad for periods of 1-5 years, yet statistics compilators still count them as residents of the National economy. Why? Because their economic interests are based at home, not the other country.
But there's more to statistics compilation than just that. Typically, the Council for Sci&amp;Tech will provide the statistics office with data on those scholarships. But what do they do with all the folks coming and going in the corporate world? They won't report that, at least not voluntarily. So there are a few rules of thumb that the guys doing the compilation will follow:

Companies working on defined projects abroad are still residents of their home economy.
For instance, a construction company from Mexico building a bridge in Guatemala, a project that will take them 3 years, will be recorded as a resident of the Mexican economy;
Employees working for 1 year or less in another country will still be considered residents of their normal country of residence;
People whose residence moved (declared intention of moving and remaining in the new country) will now be considered residents of their new country.
Companies establishing a branch abroad will be recorded as Direct Investors, and the new branch, a resident of that economy where they are located.

Beware: this may or may not coincide with the definitions by fiscal authorities. This is strictly from a statistics compilation viewpoint. Also, these are rather guidelines, but the more information a statistical office has, the better the compilation. This is why offices of different countries should seek to cooperate with others.