Agree with
@2020-MAX-Limited If the light is staying on, the circuit is open it could be physical or a bad wire, which I doubt.
The latch may have moved out of alignment or the electrical mechanism might be broken. Just to confirm, is it the lift gate or the lift gate glass?
@RichCam check a few things:
1. Are you are hearing a solid 'click' when it closes. Look for misaligned panels or obstructions.
2. Inspect the both parts of the latching mechanism to see if it moved from the original location or is loose.
3. If you have a plastic automotive interior trim removal kit, use a towel or rubber pad so you don't scratch the paint, and gently take one of the pry tools to pull on the gate or glass
Let us know what happens.