A Part 4 certificate becomes invalid when (1) a patient who has consented subsequently loses capacity (ability to understand the nature, purpose and likely effects of the treatment) or (2) a patient who has been certified as lacking capacity gains capacity.
Section 29: Withdrawal of consent
98. Section 29 of the 2007 Act amends section 60 of the 1983 Act (withdrawal of consent), which sets out the effect on a certificate issued under Part 4 of the 1983 Act by either the approved clinician in charge of the treatment or a SOAD when the patient, having given consent, withdraws that consent. The amendment clarifies the position when a patient who has been certified as unable to understand the nature, purpose and likely effects of the treatment becomes able to so understand. It also clarifies the position when a person, having consented, loses the ability to understand the nature, purpose and likely effects of the treatment. In both cases the certificate is no longer valid.
Mental Health Act 2007 Explanatory Notes - page 19