the motion auto lock is set via the GEM
if that's faulty then that could be the cause
the keyfob works the total closure/opener but you have to set the windows to operate on one shot opening/closing first
if you have disconneted the battery then all this needs to be reset, and you may need to reprogram the key to the car first