This vastly overstates it. Neither organization says it is inappropriate for treating physicians to provide disability opinions, which is untenable and flies in the face on long standing expectations of clinicians. It is vastly more problematic for physicians writ large to abdicate their responsibility to sometimes contribute information on disability for their patients.
AAPL cautions against dual relationships. psychiatrists should not serve as expert witnesses for their patients because of the conflicts that can arise. This is not anywhere the same as never opining on disability. Treating clinicians routinely assess impairment and disability as part of their work. Almost every mental disorder has impairment baked into the diagnostic criteria. In many states, grave disability is part of the criteria for civil commitment.
The AMA notes that the primary roles of the physician are in diagnosis and treatment and advocacy for the patient. They distinguish this from the independent medical evaluator (IME) whose role is not to provide treatment but an independent, hopefully unbiased opinion on diagnosis, causation, treatment, prognosis, maximal medical improvement and so on.
Most issues of disability determination are low stakes and do not involvement any possibility of deposition or trial testimony. Even treating clinicians may run the risk of being called to testify and may have to provide opinions related to disability if they were reasonably within their scope as treating clinicians.
Treating physicians are the ones who complete requests for FMLA, short term disability, emotional support animal letters, work or school accommodations, exam accommodations, jury excusal, and in some case provide information for adjudication of social security benefits. If no treating physicians did this patients would be screwed. No, you cannot farm this out to forensic experts. Most of this does not need an IME. And even IMEs are often additive; they do not replace the treating physician's role in diagnosis and treatment. In DSM-IV, it was standard to include a GAF on axis V (and even when DSM-5 came out this was often required for years after). It is often well within the clinician's wheelhouse and it could be argued there may be ethical obligations for treating physicians to assist with disability requests in many cases.
As physicians we must use common sense to determine when it is appropriate and within our roles as treating physicians to assist with disability (accommodations) requests, and when we are being asked something beyond what it is appropriate for us to do.