When I start the truck everything works fine the parking lights are on and the P on the dash is lite. When I shift to drive the light on the dash goes out, but the parking lights outside the truck are working and on, but if I turn on my headlights the front parking lights go out.
Parking light problem on 2006 Toyota 4Runner
This could be something simple like the light switch, or complicated like the wiring for the lighting circuits. Try jiggling the light switch and see if that makes any changes.
No common problem I have heard off. No technical service bulletin relating to that type of problem. Look at electrical connectors grounds and power. Wiggle varies wiring harness on the truck with the lights on see if you can "get the lights to fail". You said the "P' light is on when you first start the truck with the park lights on. When the "P" light fails and the front lights go out does the stereo illumination, ash tray illumination, dash light illumination ect.... also fail?