Main key doesn’t open/ close the car on a distance. To open/ close the car I need physical key.

BMW partner advised me to buy a new key and they did programming but the key still doesn’t open/close the door on a distance moreover sometimes I can’t start the car. Sometimes its work sometimes is not.
So BMW partner proposing me to change the lock and doesn’t guarantee me that the problem will be solved, So I decided to investigate myself.

On both keys I have changed the batteries.

Please kindly help me.