If the signing of the power of attorney is witnessed by a prescribed witness (solicitor, barrister , clerk of a local court etc) and they certify they have explained it to you, the power of attorney 'endures' through any period where you loose capacity to understand what you are doing. Without that certificate, the document ceases to be valid if you can't understand your affairs. An ‘enduring’ power of attorney is the usual type.