I composed a longish post, and a site error ate it. Short version: check the rest voltage (car off for 30 minutes, doors closed, hood open) of the 12 volt battery. If that is dying then the voltage drop when charging starts may be triggering a sensor in the alarm that warns if the power is cut. If it's below 12.3 volts, recharge the 12 volt battery externally. If the battery is 4+ years old, replace it, and charge the new one fully before installation. Good luck.
Scarlet Ember 2018 Leaf SL W/ Pro Pilot
2009 Vectrix VX-1 W/18 Leaf modules, & 3 EZIP E-bicycles.
BAFX OBDII Dongle
PLEASE don't PM me with Leaf questions. Just post in the topic that seems most appropriate.