This is out of my FSM for a 99. But it is a start for you

ARMING
Passive arming of the VTSS occurs when the vehicle
is exited with the key removed from the ignition
switch, the headlamps are turned off, and the doors
are locked while they are open using the power lock
switch. The power lock switch will not function if the
key is in the ignition switch or the headlamps are on
with the driver side front door open. The VTSS will
not arm if the driver side front door is locked using
the key in the lock cylinder or using the mechanical
lock button.
Active arming of the VTSS occurs when the
Remote Keyless Entry (RKE) transmitter is used to
lock the vehicle, even if the doors and/or the liftgate
are open when the RKE transmitter Lock button is
depressed. However, the VTSS arming will not be
complete until all of the doors and the liftgate are
closed. Refer to Remote Keyless Entry System in
the Remote Keyless Entry System section of Group
8P - Power Lock Systems for more information on the
RKE system components.
Following successful passive or active VTSS arming,
the VTSS LED on the top of the instrument
panel will flash rapidly for about fifteen seconds after
the illuminated entry system times out. This indicates
that VTSS arming is in progress. Once the fifteen
second arming function is successfully
completed, the set lamp will flash at a slower rate to
indicate that the VTSS is armed.

DISARMING
Passive disarming of the VTSS occurs when the
vehicle is unlocked using the key to unlock the driver
side front door. Active disarming of the VTSS occurs
when the vehicle is unlocked by depressing the
Unlock button of the Remote Keyless Entry (RKE)
transmitter. Refer to Remote Keyless Entry System
in the Remote Keyless Entry System section of
Group 8P - Power Lock Systems for more information
on the RKE system components. Once the alarm has
been activated (horn sounding and exterior lamps
flashing), either disarming method will also deactivate
the alarm.
Depressing the Panic button on the RKE transmitter
will also disarm the VTSS, but the horn will
sound and the exterior lamps will flash for about
three minutes as part of the Panic feature function.
Refer to Power Lock System in the Power Lock
System section of Group 8P - Power Lock Systems for
more information on the Panic feature.

So I am guessing there may be a few things to try and check here. First, lock and unlock manually and see if it does it. If so, then I would guess that the problem lies in a sensor for the door to be sensed as fully unlocked. But that is just a guess