Here's the Apple support doc on it:
https://support.apple.com/en-us/HT208857
I think the toggle is confusing. By default it's off....which means that it will prevent USB access after an hour. I believe you turn it on to allow USB access all the time.
Are you using just a power brick or are you connected to a computer? Apple notes in that doc:
Your iPhone, iPad, or iPod touch charges as usual when it’s connected to a USB power adapter.
So if you are trying to charge connected to a computer, then I think you might have the issue. They state:
If you don’t first unlock your password-protected iOS device—or you haven’t unlocked and connected it to a USB accessory within the past hour—
your iOS device won’t communicate with the accessory or computer, and in some cases, it might not charge. You might also see an alert asking you to unlock your device to use accessories.