There is a special switch in ignition lock of all Automatic models of Skoda and Volkswagen cars which prevents the key from coming out of lock if Gear is not in 'P' (Parking) position. This is done to prevent damage to Automatic Gear system of car as car can only be started and key can only be removed in Parking Mode. Any other mode will prevent key insertion or removal.
This is just a small mechanical switch which is exactly in middle of ignition lock. If you are repairing a lock for automatic car then removing it is not recommended as it may permanently damage the gear mechanism as Car's electronic system has no way to know whether car is in parking mode or in other gears.