My trunk lights are supposed to automatically turn on when the trunk is opened and they're supposed to automatically turn off when the trunk door is closed.

But, the lights to my trunk won't automatically turn off anymore. They stay on.
Can anybody tell me why this happens and what the problem is?