I just got a 2023 model Y with the same problem. Technician says the door and the charge port (the part you put the charge cable in) talk to each other and if either one of them fails to communicate as expected with the other the door flip flop can happen. In my case there's a manual charge...