Make device take power only from charger when the battery is full
"I don't really understand since the device is directly connected to AC, the battery should be bypassed and never been used.

If you mean li-ion battery, cycle use is recommended
since keeping it fully charged for 24/365 may shorten its life cycle as in your case.

Since you need battery as backup only, use UPS (Pb  gel battery) coming with bypass instead