I second LeftieBiker's recommendations to check the dash button and key fob button (check all key fobs). The car is programmed to prevent opening the charge port door while the car is on. Therefore, a continuous command from either the dash button or a key fob to open the charge port door will result in the door opening as soon as the car is turned off.
I had a key fob fail internally on another vehicle 10 or 15 years ago. The key fob started transmitting door lock commands continuously. It took me a while to figure out what was causing the doors to lock all the time. I removed the battery from the failed key fob to stop the inadvertent locking once I identified the problem.
Silver LEAF 2011 SL rear ended (totaled) by in-attentive driver 1/4/2015 at 50,422 miles
Silver LEAF 2015 SL purchased 2/7/2015; traded 8/10/2019 at 82,436 miles
White LEAF 2019 SL Plus purchased 8/10/2019