the switch is built into the handle catch...not into the door frame pillar.
it is sticking AND your handle catch is worn as well. The only thing I know of on how to fix this (as I dont know where to get the little switches aside from a junkyard) is to pull off the door panel and pull out the latch catch assembly.
you'll see two sensor switches. they are both passive resistance type (a spring loaded deal where the plastic piece rides along the "cam" which presses the piece in until the metal on the backside contacts the bottom ram and completes the circuit...or, once the spring is extended due to the plastic being pushed out and then contacting the other metal end).
it seems like yours is probably sticking and contacting too soon as the only time it should contact is with the door open meaning the latch itself is fully extended (as its not gripped around the latch knob) and is contacting.
pull door panel off, remove latch assembly, find both sensors (door buzzer, dome light), play with said sensors to understand better after removing from latch assembly and playing with them while hooked to harness.
then and only then, lube them up. now you fully understand why it was doing what it was doing. I personally have to pull mine apart and replace the switches as I know they are sticking...yet again...and I'd rather just source a few from the u-pull five finger discount program and replace them with free moving ones...
where's my mimosa