Yes it will do it both on high and low beam. Usually on high beam it starts screwing up sooner. I definitely think it something heating up. Look at and cleaned the firewall connection not that it needed it. I’m thinking either high/low beam switch or the headlight on off switch especially if it has some sort of breaker or relay built into it.