I've struggled with this for years. At a firmware level, if they could figure out if it's in the case, but not connected, just shut it off and not drain it to zero. Not a real fix but it'd be better than the current design.
My workaround is to just be super-patient when putting them back in the case. You can use the light on the front of the case as a judge to whether the earbud landed properly and is charging.
- Make sure front case light is off
- Place one bud, make sure light turns on
- Wait for light to turn off
- Place second bud, make sure light turns on
(Insert joke about burying underground away from all movement and sudden jostling from passing trucks - perfect for a workout-centric device)
It's the pickiest connection, but the above works for me. I keep the connectors clean, but certainly "move the earbud until it clicks" is not sufficient to avoid the problem.