What year? 2005-7 have a tear-drop shaped fob that’s separate from the ignition key; 2008+ have the fob buttons (lock/unlock/rear gate/panic) integrated with the key.
Normally, the keyless entry fob does not lose the coding/programming with the car when the battery is replaced. Are you sure the new battery is installed the correct way?
somewhat moot at this point, but wondering what you mean by “manually from the inside”. Is that using the lock/unlock switch on the driver door panel, or is it setting the mechanical lock/unlock control that’s part of the inside door handle on each individual door?