The auto dimmer responds to lighting condition and I regularly seen this on almost every version of OS, I usually turn off auto feature because it seems to use more power anyway.
Just go to Settings / Display / Brightness / Unchecked Automatic Brightness