The sun “turns off” every night. It is natural to turn off the light at night to simulate a day’s cycle. I’m am fairly @Sarah_sinc meant 9:30pm which is more than enough daylight.Your basking light should never switch off. How weird would it be if the sun suddenly went off? If it's too hot with it on all day, try raising the light a little bit.
She was talking about the thermostat turning the basking light on and off when the enclosure gets too hot. I can see how the wording might be confusing. I had the same thought you did at first.