Guidance on the meaning of resident and ordinarily resident in the United Kingdom can be found in:
The existence in the United Kingdom of a branch or agency of an overseas concern does not of itself make the overseas concern resident in the United Kingdom even if the profits of the branch or agency are chargeable to United Kingdom tax. Therefore employees who:
will be employed by a foreign employer (see
EIM40031).
Similarly, employees of an overseas government who work at
an embassy or High Commissioner's office, etc. in the United
Kingdom will be employed by a foreign employer.