Same problem.
I work on different things from 8am to 10pm.
For 3 weeks my macbook pro 14 m3 pro was at 100% charge always connected to the power cord and an external monitor until it "learned my routine". I would use it until 10pm, turn it off completely, unplug the charger until the next day. One day I forgot to unplug the charger after turning it off (apparently the optimized charging doesn't work if you turn off the macbook completely) and the next morning I noticed it was at 100% (led on the charging cable was green). That was enough for the charging function to stop working properly.
4 days later I went to an event where I could work during downtime so I used it for a couple of hours without charging and the battery woke up at 100% and I used it up to 90%. Then I found a place to charge the device and it decided to charge at 100%.
Since then the charge goes up to 100% for a random amount of time (sometimes it's a couple of hours) and then goes down to 80% arbitrarily, consuming charge cycles for no reason. The "learning algorithm" is horrible.