windows.shell.autodarkmode.dll Error in Windows 10 and 11: Windows theme switching

Windows changes some theme elements but leaves an expected shell view unchanged, and its event identifies windows.shell.autodarkmode.dll.
The Windows file inventory identifies windows.shell.autodarkmode.dll as Auto Dark Mode. Capture the actual error, file path and Windows build before making changes.
Check where the error occurs
Check the intended Windows and app color-mode settings and the feature available on that build. Compare a built-in app with the affected shell view.
Repair the affected feature
Update Windows through its supported channel. Restore the intended supported theme through Settings and update an affected app separately if Windows applies its setting correctly elsewhere.
If Windows reports corruption of a protected system file, use Microsoft’s system file repair procedure. Obtain software and drivers through Windows Update or the applicable publisher.
Verify the repair
Change the theme by one supported step and confirm the affected view and other selected Windows controls respond as intended.
See the publisher’s guidance, the exact Windows file record, and the related PC Repair Atlas guide.