Modern e-bike batteries and chargers feature protections to avoid overcharging; however, leaving an e-bike battery plugged in overnight may overheat and damage its internal circuitry.
To maintain optimal battery health, it's best to abide by manufacturer recommendations. https://ebikereviewerdentinygraves.blogspot.com/2024/09/is-it-ok-to-leave-my-ebike-on-charge.html