The P-38 was a great airplane and entered service very early in the war. It was a first generation "super fighter". It was there in the fight in '42 and '43 before our superior "war winning" fighters showed up. The Lighting was withdrawn from escort service in the European theater as soon as more capable aircraft arrived. What's the point of an escort that needs an escort?
The P-38 was used successfully on other missions as a fighter-bomber, recon, and a pathfinder. It was successful in the Pacific due it's great range and twin engines. Two advantages on long over water missions. Even there, it was entirely superseded by P-51's in escort missions just as soon as the Mustangs and their drop tanks got there. There weren't many Japanese pilots left to shoot down in '45 anyway.
After WWII the P-38 was quickly withdrawn while the P-51, P-47, Corsair, and others flew on for decades in AF, Naval, and Air/Naval Guard/Reserve service. That kind of says it all. The P-38 was a 486 and the later planes were all Pentiums.
It's too bad they never put the P-51's Packard/Royal-Royce engine in the P-38. That would of been an awesome plane. An American Mosquito. Speed and altitude of a P-51. Range and payload of a B-17 in a one man platform. Shoot one down (if you could catch it), you lose one guy instead of 10.