This is a feature Windows 10 uses called "Adaptive Brightness" and it sucks. To disable it please review the steps below.
1. Right-Click on the Start button
2. Click on "Power Options"
3. Click on "Change plan settings" on whichever power plan you're on or want to change.
4. Click on "Change advanced power settings"
5. Scroll down until you get to "Display" and expand it
6. Now click on the plus sign next to "Enable adaptive brightness" to expand it.
7. Change to your liking! Both of mine are set to "OFF"
Hope this helps