iPad Screen Dimming While Using As Sidecar (second display)
In case anyone has the same issue, a fix is:
Adjust Attention Awareness Features:
Go to Settings > Face ID & Passcode.
Turn off Attention Awareness Features.
—
The above issue is different from auto-brightness:
Adjust Auto-Brightness
Go to Settings > Accessibility.
Turn off Auto-Brightness.
—
Apple Resources:
Use an iPad as a second display for a Mac (sidecar)
Change Face ID and attention settings on iPad
Adjust the screen brightness and color on iPad
iPad Pro, iPadOS 17