Typically, your vehicle’s lights will turn off automatically a few seconds to a minute after you close all of your car doors. However, if the door switch is malfunctioning, your dome light will never turn off.
There are two things that you can do in this situation: turn off the lights completely so that they never turn on automatically in the first place, or have your door switch repaired to ensure that your lights turn off after you leave your car. The repair will probably cost you around $200, depending on the mechanic you choose.