How could Shenzhen possibly compete with the rest of the world in electronics?
Specialization is the answer. The bigger you are, the more fields you can be competitive in. But even regions much smaller than the UK can be world leaders in something, if they choose to prioritize that and play their cards right.
There is nothing preventing the UK from taking advantage of the talent pool, supply chain, and consumer market of an equally large economy in their chosen field. Except maybe the UK itself.
National borders are as important as you choose to make them. Small countries have always relied on diplomacy and trade to be successful. The UK just needs to accept that it's one small country among many, and start acting accordingly.
Specialization is the answer. The bigger you are, the more fields you can be competitive in. But even regions much smaller than the UK can be world leaders in something, if they choose to prioritize that and play their cards right.