Electric locks malfunction on 2003 Chevrolet Venture

My electric locks fail to lock the car when I am in parking position with engine off. When the engine runs and in Drive, all door lock automatically lock and remain locked even in Park position. All door unlock when ignition turned off. All doors then have to be locked manually, because lock switches on both front door do not work.

Asked by for the 2003 Chevrolet Venture