What you’re failing to grasp is the concept of a chartered corporation. The BBC exists on the basis of a charter issued by the government. (The charter is issued in the Queen’s name but she otherwise has nothing to do with the process.) That however does not mean that such a corporation is a branch of the government nor that it is controlled by them. All it means is that it has been granted the right to exist, plus certain legal privileges. Lots of organisations in Britain, from many town councils to universities, exist on such a basis. All regard themselves as independent of national government. The government does, in theory, retain the right to withdraw the charter but then the British government, acting in conjunction with Parliament, can, in theory, do pretty much what it wants (it’s called democracy), so this doesn’t make that much difference. For most purposes, the fact that it exists by royal charter strengthens the BBC’s legal independence. The BBC can defend at law its independence from government because the government has already declared that it is independent.
Another concept you need to grasp is that of ‘arms length’ funding. Countless bodies in the UK, many of them corporations, receive government funding without the government retaining any control over their operations. There is a very powerful public concensus that, in such cases, the government should not attempt to interfere. The BBC is a classic case of such an arrangement. The government provides the money on the principle that such bodies are ‘a good thing’ and then allows others to take the flak over how it is spent.
If anything, the example of Thatcher shows how difficult in practice political interference actually is. Appointed governors have a tendency to go native. What influence they have largely depends on their willingness to defend their own independence and that of the BBC. One should also note that, in the end, even Thatcher decided that abolition of the licence fee wasn’t worth the trouble.
That’s the thing about unwritten constitutional principles - sometimes they can be every bit as powerful as written ones.