I 'think' there's a technique required where you have to switch the ignition on/off x number of times then press the fob button. Dealer should be able to advise.
The fobs use a 'rolling code' i.e. after each press the vehicle knows what to expect on the next press - however, replacing the battery must reset the sequence in the fob so both ends of the system 'lose' each other.
If you have to change the battery in the future I believe you can do this if the change is made within x seconds (again I don't know this for sure but suspect the fob allows for 'some' time to make the change).
If you DO find the solution could you post the answer for others? Ta