For some reason mine has stopped doing that a long time ago, since then if I leave it plugged in it always stays at 100% charged, even though I do have optimised battery charging enabled. 

Edit: searched a little about it, seems like a common occurrence for some people after updating MacOS, found people reporting this issue both on Intel MBPs, and M1 MBAs, didn’t look more to check M1/M2 MBP and MBA. Found about this app as well that I just installed to regulate my battery charging: https://apphousekitchen.com/