There are issues with testing components for an intermittent failure.
The very instant you remove the part for testing you have altered the conditions under which the failure occurs. So you cannot know if there was trouble with the connection(s) between the part and the vehicle.
And the part can test OK but still fail under different conditions such as temperature. Maybe it fails when hot.
In my read of this thread I have seen no mention of high beam vs low beam.
If I assume the we are speaking of low beam failure I would ask if the high beam lamps work when the low beams fail?
The BCM controls both high and low beam lighting with input signals from the headlamp and multifunction switches. The high beams are powered with a standard electromagnetic relay. The low beams are powered with the HDM, Headlamp Driver Module. This is the PWM device you have been talking about.
The HDM has 12VDC positive power at all times straight through a fuse from the battery. It also has frame ground at all times. The HDM output is wired through separate left and right fuses to the respective headlamp.
The HDM control signal terminal is wired to the BCM. There is a pull-up resistor in the HDM between the 12VDC+ power and the HDM control signal terminal. This can be seen printed on the side of an original equipment HDM.
View attachment 62596
To activate the low beam lamps at full power the BCM grounds the HDM control signal wire. (this may not be a full true ground but the maximum PWM the BCM is capable of? going by memory here)
When the DRL (daytime running lamp) operation is desired the BCM uses a PWM to ground signal on the control wire to run the lamps at about 80%.
It is my understanding that the DRL does not operate the lamps while the transmission is in Park. And the 2002 model year vehicles (maybe 2003 also?) do not have a "DRL OFF" headlamp switch position like the later models do. Canadian vehicles have the DRL always, they cannot be turned OFF.
There is an ambient light sensor in the center of the dashboard up by the windshield heater vents. This is connected to the BCM and is used for determining the use of the DRL system or the Auto Headlamps function.
With ample daylight sensed and transmission not in "Park" the BCM should engage the DRL lighting, low beams at about 80%.
When the ambient light sensed by this sensor falls below a threshold value the BCM should engage the low beam lamps at maximum power.
Now for the headlamp switch operation.... In the "Auto" position the headlamp switch does not connect anything at all. No control terminal is connected to any other control terminal.
On a 2002 model year there are two input signals from the headlamp switch to the BCM. One is for Park lamps and the other is for Head lamps. These do not switch any operating power at all. These switches operate by grounding control signals from the BCM in similar fashion to what we see in the HDM.
The BCM activates the high beam relay or the HDM (low beam) in accordance to the headlamp switch position and the ambient light sensor value.
So what use is all of this to the issue at hand? Not sure.
If the low beams turn off completely and do not respond to the headlamp switch position shall we guess the HDM is failing?
But what about shifting the transmission to the Park position? That should not make any difference at all to nighttime low beam operation. Only the DRL operation should be affected by the transmission range setting.
Do the low beams come on immediately when the transmission is shifted into Park? Or do they come on when shifted back out of Park?
Is it possible that the ambient light sensor is involved here? Could we be seeing the 80% DRLs at night and not the full brightness low beams?
At night does the "Headlamps ON" indicator turn on like seen here....??
View attachment 62597
I don't have a clearcut idea here, just throwing out thoughts. I always hold that the best way to fix something is to first learn how the whole business is supposed to work, then go from there