It may be the microswitch inside the door lock assembly. It can get jammed or fail, and then the computer thinks the door is always closed. What happens when you open the door is that the window drops while your hand is on the handle (inner handle/inner switch,, outer handle/outer switch) but as soon as you release the handle, the window goes right back up.
If the window fails to drop when you lift one of the door handles, that is the microswitch for that door handle. If the window drops and then goes right back up when you release the handle, it is the switch in the door lock assembly...
The solution is to roll down the window a little bit before getting in and out... I have been doing that for the last year on my passenger side..... I have the part to fix but just haven't wanted to dive in....