This is a common problem with "smart chargers", that they get stuck in float charging mode as the final stage.
So any loads appearing on the battery are unnoticed and a battery can eventually go dead or get harmed.
Another RV/Caravan charger does a similar thing, stuck in pulsed float charging it never goes into bulk charge or equalization mode and with only float voltage the battery fails after 1-2 years. even though it can catch up overnight.
For an algorithm, you could shut off charging and look at battery voltage.
If the voltage or SoC is dropping, the battery has a load or a shorted cell.
Some smart chargers do this, they re-assess the battery in each stage to see if they need to roll back.
Example "Charge cycle restarts if voltage drops" example C-tek 8-stage charger, at the very last bottom note but who knows what voltage it has to drop down to?
The C-tek use cheap crappy capacitors so they aren't great quality and pretty overpriced, IMHO.
Optimate and Deltran do not seem to restart charging when in float mode.