It is important that you always insert the cable properly into the holder on top of the rear fender after opening the lock, otherwise the e-bike will still think that the vehicle is locked. The result is that you cannot lock your e-bike when you end your ride.
If the e-bike does not lock, put the cable in the rear fender and then back in the lock and close the lock via Gaiyo.