Disconnect from the car. Now test the car for all functions. Once you see the car is function properly. hook up the trailer now test the car again does it still function properly with the trailer hooked up. If the car is functioning properly now check the trailer. If the trailer is not functioning properly start the car with the trailer hooked up and test for proper trailer functioning again.
By the time you run these tests you will have ruled out the car causing the issue. A brake controller causing the issue and have hopefully isolated it to the trailer.
If your trailer has electric
brakes do you have a breakaway disconnect switch. If you do pull the safety pin and re-seat it back in.
If you still have the lights staying on unplug the trailer from the tug. Once the trailer is unplugged does the
light go out. that will tell you whether you getting power from your trailer
battery or from the tug.
When i first set up my trailer with my RF brake controller the lights don't work properly unless the truck was started and sending power to the controller.