When I had this problem with my old BMW the alarm would start to go off once I reconnected the battery but was silenced by unlocking the doors using the remote which then reset the security/alarm system.
why not remove the battery from the vehicle then recharge the battery ?
you could even remove the terminals from the battery thus disconnecting then connect the charger without removing the battery