How can I fix an auto brightness issues on my iPad Pro?

Recently my iPad has been changing the brightness of the screen at random. What could the problem be and how can I stop this?
Welcome to iMore! It's supposed to change when you have auto brightness on. It changes according to the light in your environment. If the lighting changes, it changes with it. I can be sitting in my chair with a lamp beside me. If I lean forward, the brightness changes because I moved to a darker spot.

You can stop it by turning auto brightness off.
Where is auto brightness?

Original thread: https://forums.imore.com/threads/how-can-i-fix-an-auto-brightness-issues-on-my-ipad-pro.352981/