Having a weird issue with my 96 Dakota. If i turn on the high beams they are fine for about a minute...then they go out. Sometimes for 2 seconds and come back on....other times its longer. When i go to low beam they come right back on.

I dont have a problem with the low beams and the dash lights stay on

Ive cleaned up all grounds and connectors under the hood . The headlight switch is new.

Anyone had this happen?
Any ideas ?