Hello mgaspar71,
It seems like your AirPods Optimized Charging keeps turning off even after you've turned it back on, right? Do you know which AirPods firmware you have?
About firmware updates for AirPods - Apple Support
"Find your AirPods firmware version
Firmware updates are delivered periodically while your AirPods are charging and in Bluetooth range of your iPhone, iPad, or Mac.
Because firmware updates are delivered automatically, you don't need to update your AirPods.
To use your iPhone or iPad to check that your AirPods are up to date, make sure that you have the latest version of iOS or iPadOS. Go to Settings > Bluetooth, then tap the Info button
next to the name of your AirPods. Scroll down to the About section to find the firmware version.
To use your Mac to check that your AirPods are up to date, make sure that you have the latest version of macOS. Press and hold the Option key while choosing Apple menu > System Information. Click Bluetooth, then look under your AirPods for the firmware version. With macOS Ventura, you can also choose Apple menu > System Settings, click Bluetooth, then click the Info button
next to the name of your AirPods."
Make sure you're using the latest firmware.
Regards.