I also recommend using local counsel on this question. However, if a court declares the principal incompetent and appoints a guardian of the person, the guardian typically assumes the legal right of the principal to rescind the power of attorney. So, they can work together or the guardian can take over and void the power of attorney if necessary.
_________________________