Your vehicle may have a Retained Accessory Power (RAP) feature which will allow certain features on your vehicle to continue to work up to 10 minutes after the ignition key is turned to LOCK.
The radio, power windows, and if the vehicle has these features, the sunroof and OnStar® System, will work when the ignition key is in RUN or ACCESSORY. Once the key is turned from RUN to LOCK, these features will continue to work for up to 10 minutes or until a door is opened.