I have had the problem with the auto headlights coming on and not auto turning off since the Autumn.
When I set off in the mornings, with the early morning sun level on the horizon, it activates the auto headlights and they won't switch off. I have tried pulling over and turning the power off and switching on again, it cures it for about 2 minutes and it auto switches on again. There is never a problem when it is cloudy or overcast and have never had a problem later in morning or in the afternoons when the system works as it should do. Ironically, the other day I had to drive though freezing low lying fog on a country road and the auto headlight wouldn't auto switch on and I had to do it manually.
George the taxi man on Youtube (Fancy a Bev) has had the same problem and has done a video on it, and he took the car to his dealer and they spent a couple for days testing the auto headlight sensor. The prognosis was that the system was working as it was designed to do and there was nothing wrong with the system (a bit like the BMS in rapid gate). From memory I think he was demanding the at NISSAN instigate a repair, but was getting no where.
When it happens now, I just accept it, and turn the switch to side lights, the problem is, as others have mentioned, it makes the infotainment / satnav screen dark and the speedo binnacle dark. The infotainment / satnav screen can be brought back to normal brightness by pressing the day/night button, cannot do anything about the speedo binnacle, though.
Pity there is not a turn off switch for the auto setting, I don't have a problem switching the light on when it gets dark, I have been doing it for forty years.
There is various settings for adjustments of the auto headlights in service menu of Leafspy, including "Disabling" the auto setting, but doesn't seem to work.