I would expect it to normally be able to keep the TV coding through a battery change, but maybe yours can’t. Hopefully you can go to: Settings -> Remotes & devices -> Remotes [select your remote] -> Set up remote for TV control and get it set up again.
Banned but back. Because why not?