hey... welcome to the forums!
i am just guessing here.
my inverter will stop working when the battery voltage reaches 11V. maybe your lights are more sensitive and stop working at 11.9V or so.
i assume that your lights are 12V here. this thread
https://permies.com/t/56779/solar/Automotive-LED-lights-grid-lighting talks about constant current controllers in the last post. maybe that is the solution
if your lights are 220/110V through the inverter, then it is a different thing. but i guess, that your battery is running low. did you check the voltage of the battery, when the lights go out? does the inverter shut down? they normally give a sound signal, when they reach low voltage and shut down.
good luck and blessings
tobias