Article 23 of the charter:
"The Security Council shall consist of fifteen Members of the United Nations. The Republic of China, France, the Union of Soviet Socialist Republics, the United Kingdom of Great Britain and Northern Ireland, and the United States of America shall be permanent members of the Security Council."
So long as the UK continues to exist, it is a permanent member with a veto.
Notice that Russia is not in that list, but it retains the permanent seat allocated to the USSR because it is deemed to be a successor state.
So long as the UK breaks up in a manner that results in the Westminster part being deemed the successor state, it will retain its seat. It is difficult to imagine a disintegration in which this isn't the case, unless it's a wholesale Yugoslavia-style military collapse.