The switches that control the lights for open doors are made right into the door latches and they have a history of sticking and causing problems like that.
Here is a technique that often works well and eliminates the problem at no cost.
Get a can of spray lube like WD40 or something like it and has a straw on the nozzel. Spray it generously up into the latch mechanism. Now open and close the door numerous times to work it in. Repeat this process several times. Since you don't really know which door is causing the problem, you should do all of them. It's usually caused by the most frequently used door but it's not guaranteed to be that one.