Exactly. It is a feature.
You’re charging your Mac wrong… no no, Optimized Charging is just very stupid and not optimized for use cases and scenarios like these because no one in Cupertino works like that or thinks about it. Just turn off OBC and you should be good.
My MBP also does funny stuff like this, you and your Mac aren’t alone in your confused state of silent suffering and senseless ageing.
I'm not disconnecting mine at all, and it's still doing this daily. I kept thinking it'll eventually just settle down to 80% and hold there, but it's been over a month. Always plugged in, and yet every day it discharges to ~90% and then immediately charges back to 100%.
I spoke with a senior advisor, who agrees that this sounds like neither Optimized Charging (which predicts when you need 100% charge and wait for optimal time to charge back up) nor Battery Health Management (which may reduce total charge level to say 80% to extend battery longevity). Even tried escalating this to engineering. They came back and told me to do a clean install, which I did. This discharging happened WHILST the system was being re-installed, so it feels like this is something baked deeply into the firmware...
Things I've tried so far –
1) Disabling Optimized Charging;
2) Deleting content in /private/var/db/powerlog, /private/var/db/powerUI, which cleared out the battery histories, hoping a retraining of whatever model smart charging uses would occur;
3) Reinstalling the OS;
4) Using a different set of power adapter + magsafe cables.
5) Forced a few full discharges.
None of these worked.
BTW I think this only started happening after I re-installed the OS after 12.1 came out. Before 12.1, the system did hold the charge level at 80% after a while. So it's possible it's a new, undocumented behavior. Or it's a bug...