I wonder if people realise this is already a thing in the UK, under Theresa May a number of Civil Service positions were restricted to “sole UK nationals”.
It’s actually quite common in the adverts for certain security, IT and critical infrastructure roles, particularly in the Cabinet Office and MOD but also other depts. I understand you *can* sometimes apply for an exemption.
There were always some restricted jobs. One of my friends couldn't apply for a particular foreign office job because she was half French. That was 2002.