@KLF. so given your issues, here's how I'd go about this.
First, do you have any extra lighting on your truck at all? Anything like a light bar or spot lights you added months ago? If so is any of that tied into any of your switching (i.e. driving lights tied to the high beams)? Or did you use an add-a-fuse on the light circuit to get an always-on accessory? I'm assuming the answer to all of this is no, but I figure it's worth asking since I'm doing this online and not in person.
Now, fire up Techstream and see if there are any codes stored in the system somewhere under "Body Electrical". Not the normal emissions codes, which throw the check engine light, but Toyota-specific codes, which might be related. You probably don't have one stored, but if you do it would save a bunch of time trying to diagnose this. I've attached the FSM troubleshooting steps which basically say the same thing (check battery voltage, check for codes, then try to troubleshoot).
The "operation check" portion of the troubleshooting is pretty straightforward. I suspect the part I highlighted in red below will fail but I'm curious nonetheless
4. CHECK LIGHT AUTO TURN OFF OPERATION
(a) Turn the engine switch on (IG), and turn the light control switch to tail or head.
(b) Turn the engine switch off and open the driver door. If the light control switch is tail, check that the taillight turns off immediately. If the light control switch is head, check that the headlight and taillight turn off after approximately 30 seconds.
(c) Turn the engine switch on (IG), and turn the light control switch to head.
(d)
Turn the engine switch off and open the driver door. Within 30 seconds, lock all the doors. Check that the headlight and taillight turn off immediately.
Next thing I'd personally try is to swap the headlight relay with another similar relay, if one exists. I'm wondering if the relay is bad and shorting. A bit of corrosion or water in the relay can cause the lights to stay on if it's shorting (or sticking). I've attached the inspection procedure for the headlight signal circuit as well, which hopefully will help you.
Techstream has a huge "main body" "active test" section which will let you confirm signals for all sorts of stuff. This is definitely a good way to diag. For instance it'll let you check the ignition switch to see if it's ACC or IG "position". So while you may have turned your vehicle off, perhaps the switch is bad and shorting to IG or something weird?
Finally, I also attached the 3 inspection procedures (light control switch circuit, engine switch, and door courtesy switch). There's no other test procedure for the main body ECU so let's hope it's not that.