The car has a system that will not let you remove the key if it is still in drive. I would suspect the shifter switch is going bad. The switch is mounted on the gear lever. By disconnecting the battery you are taking power away from the ignition lock that stops you from turning the car off.
RepairPal Certified shops can diagnose and repair your 1993 Honda Civic. They provide transparent pricing with a minimum 12-month or 12,000-mile warranty on repairs and services.