Hello again Customer (name blocked for privacy), your problem sounds like your lighting switch is overheating and shorting out (common problem) or possibly a bad ground. Check all of your ground wires under the hood around the lights. Wiggle them and the plugs while the high beams are on to see if they flicker or go out.
If that's good, then try feeling the switch while high beams are on and just before the lights flicker or go out. If the switch gets hot, you'll need to replace it.
I hope I have been helpful.
__________________
Russell S Wydra