ijk
Confirmed.
I can get it to work on subsequent plug ins without rebooting if I toggle the switch before unplugging, and again after plugging in.
These could be further simplified: In the state after step 3 (reboot with charging optimization disabled), if only plugging in charger with charging optimization disabled, enabling charging optimization later with charger online could stop charging at or above 80%.
Thus, in the state after step 3 (reboot with charging optimization disabled), DO NOT plug in charger with charging optimization enabled, or the phone will go back to the "charging beyond 80% with charging optimization enabled" state, until it completes a fully charge to finally stabilize the "charging optimization" state, BRFORE the next reboot.