I’ve been using 75% alcohol sprayed onto a good microfiber cloth to clean both my MacBook Air M1 and my iPhone 11 Pro Max. This process works great for both devices and I’ve never had a problem. I agree with the above comments in that you either have auto-brightness turned on or the sensor is damaged (rare). As stated above, try turning off “True Tone” which will de-activate “Auto-Brightness”.
Good Luck!
Jeff Broome