This article explains how to disable Optimized Battery Charging on iPhones running iOS 13 or later.
How to Disable Optimized Battery Charging on iPhone
Apple designed Optimized Battery Charging to reduce wear and extend the lifespan of your iPhone's battery. It reduces the strain on your phone's battery by keeping it charged at 80% when you're not using it for extended periods of time.
Here's how to disable Optimized Battery Charging when it doesn't meet your needs.
Open the Settings app.