Exactly, it is the Govt/HMRC that needs to look at how it levies tax more efficiently. For a kick off, simplifying the tax system dramatically would leave far fewer loopholes. The UK corporate tax system really needs major reform it is a complete mess. It is massively complex and costly to administer for small and medium sized businesses and ineffective at collecting tax from large business. It is at least 50 years out of date.
In reality, it is nearly impossible to collect significant amounts of UK corporation tax from global multinationals now and the advent of the internet and especially virtual and online businesses that have no physical bricks and mortar makes it even harder.
It is not a new problem, for example, a major part of the global shipping industry has resided in the UK for decades and pays very little tax here because all the ships are registered and owned out of Liberia and other low tax countries. Ships move around the planet and hence do not reside in the UK. The Govt and HMRC accepted a long time ago that it cannot tax this industry like a normal bricks and mortar business but took the sensible approach of making sure the industry stayed in the UK and the wealth it brings in the form of jobs is taxed.
I used to work for such a business that paid virtuall no UK corporation tax at all. It had around 500 staff here and transacted well over $1 billion every year and that was in the 1980s. It broke no laws and paid all the tax that was due - which was the income tax and NI on staff wages as well as VAT on goods and services it bought and business rates on its offices. Those were the things that it had to use in the UK and the only things it could not move or do offshore.