The front windows most likely need to be re-initialized. To do this roll the window down using the main switch (door closed) about 6 inches. Then roll it back up by holding the button down and do not let go of the button for about 10 seconds, then press down and hold the down until it stops and press and hold for 10 seconds, then press and hold up again until it fully closed and hold the button for 10 seconds. Then check to see if auto up and down work correctly. Do this for both windows. The all button will not work correctly if the front windows one or more are not initialized which was most likely lost during the battery power loss.
Sometimes this has to be done using the BMW tester so if this does not work you may have to schedule to have this done. It would only cost about .5 hours to have the windows initialized.
I hope this helps. Please remember to press the accept or feedback tab so I am compensated for my help today.
Thank you in advance.