When your dome lights turn off automatically after you close your car door, that’s because there is a switch inside your car door that is triggered by your door making contact with your doorframe. If this switch is faulty, then your vehicle’s dome light will remain on after you close your door.
If you’d like to get this issue fixed, you’ll typically be looking at a repair bill of around $200—although, the actual cost depends on the mechanic you choose. Otherwise, you could simply turn off your dome light completely to avoid accidentally draining your battery by leaving the light on.