One issue may be the difference between the key fob security for operating the locks which I believe is just a coded radio signal, and the security key itself which I believe relies on a special chip inside the metal key itself. An aftermarket key may not have the chip in the metal key that will allow it to start the car due to the anti-theft not being satisfied, even if the signal from the plastic fob can unlock the door.
There is a seperate programming procedure for getting the Passive Anti-Theft system to recognize the security keys themselves that is seperate from just programming the fob to operate the doors. The following procedure is from my 2015 manual, starting on page 59.
"Programming a Spare Integrated Keyhead Transmitter You can program your own integrated keyhead transmitter or standard SecuriLock coded keys to your vehicle. This procedure will program both the engine immobilizer keycode and the remote entry portion of the remote control to your vehicle.
Only use integrated keyhead transmitters or standard SecuriLock keys.
You must have two previously programmed correctly coded keys and the new unprogrammed key readily accessible. See an authorized dealer to have the spare key programmed if two previously programmed correctly coded keys are not available.
Read and understand the entire procedure before you begin.
1. Insert the first previously programmed correctly coded key into the ignition.
2. Switch the ignition from off to on. Keep the ignition on for at least three seconds, but no more than 10 seconds.
3. Switch the ignition off and remove the first correctly coded key from the ignition.
4. After three seconds but within 10 seconds of switching the ignition off, insert the second previously correctly coded key into the ignition.
5. Switch the ignition from off to on. Keep the ignition on for at least three seconds, but no more than 10 seconds.
6. Switch the ignition off and remove the second previously programmed correctly coded key from the ignition.
7. After three seconds but within 10 seconds of switching the ignition off and removing the previously programmed correctly coded key, insert the new unprogrammed key into the ignition.
8. Switch the ignition from off to on. Keep the ignition on for at least six seconds.
9. Remove the newly programmed correctly coded key from the ignition.
If the key has been successfully programmed it will start the engine and operate the remote entry system (if the new key is an integrated keyhead transmitter).
If the key was not successfully programmed, wait 10 seconds and repeat Steps 1 through 8. If you are still unsuccessful, take your vehicle to an authorized dealer.
Note: You can program a maximum of eight coded keys to your vehicle. All eight can be integrated keyhead transmitters."