It is illegal to leave a vehicle unattended with the engine running. However, with keyless entry and push-button start systems, it is possible to leave the car with the engine still running. To do this, close all the doors from the inside and exit the driver's side door with the door handle. Lock the door with a mechanical key, as it will only open with this key.
This is especially true for silent hybrid cars, as their engines may not be running when first parked but will start later as the batteries run out. Even many non-hybrid cars today have extremely quiet engines, making them almost undetectable when parked. If the keys are in the ignition, it should work, but if not, they must be unlocked again. This lock feature is now standard on most new cars to avoid blockages.
Whether the car is running or not, if the keys are in the ignition, the door pin should not be locked when pressed. The convenience of leaving a car without a key running is appreciated by owners who no longer have to fumble with car keys. This feature is found in millions of cars today and is a great way to save time and effort.