Same thing happened to me with a 99 honda accord. Only able to remove the key with the battery disconnected.
I fixed it by taking the automatic shifter apart. I think something happened and it became misaligned inside. I put it back together and it worked again!!
Hope this helps