Auto-brightness appeared in the very first iPhone, and this function can be convenient, but sometimes it interferes, exposing either too high brightness, or too low. In iOS 10 it was turned off simply – you had to go to Settings> Display and brightness. But here in iOS 11 car brightness there, alas, is no more:
However, you can still turn off auto-brightness, but now Apple has hidden it far in the bowels: you need to open Settings> Accessibility> Display accommodations, and already here you can turn it off:
How to turn on auto brightness on iPhone
Do the same, but in the reverse order.