Does the dome light come on when you open the door?
That should tell you if it is a door switch issue.
I haven't fully trusted the automatic lights for years.
Not because they don't work but because there have been numerous times one of us has turned the key to roll up windows or listen to radio and not been in the drivers seat to have to open the door to get out and not realized that headlights came on and didn't get shut off.
No REAL damage, just dead battery.