As pzn noted, they were a pretty bad case of "dictator meddles too much and needs too much control" but we should consider these conflicts had other factors working against them. Let's go roughly in order (events overlap a bit)
Egypt: The Egyptians has a much larger force and were well equipped. Yes, losses in Yom Kippur were bad but their arsenals were deep. A force over 650k men, close to 2k tanks, 2.5k APC and IFVs, over 1000 heavy guns. Even if you assume 100% of tanks that crossed were catastrophic losses, they still had 700+ left. Equipment isn't everything, but it helps. Moreover, Egypt just had more combat experience. They fought two major wars in the decade prior. They lost, but as Yom Kippur showed, they managed to improve a fair amount and Israel was on the brink (American resupply was critical). So Libya was going against a much larger force that had more recent experience in what modern warfare looks like.
Uganda: Libya had maybe 5,000 troops in country to assist a force of 20,000 troops. The Tanzanians had 150,000 and greater foreign support in the ways it mattered. Pakistan and Saudi Arabia had nominal aid to Uganda but Tanzania had regional support from Mozambique, Ethiopia, and Angola. Algeria also was on their side which meant Libya had to be more careful to not overcommit. Even if those troops were top tier (they weren't) there is a limit to what they can do when outnumbered that badly.
Chad: They were trying to prop up a rebel faction and act as the heavy firepower to their infantry and recon. They brought a lot of guns, tanks, helicopters, and fighters but not that many infantry. Yeah it was a lot of troops, but turns out aviation needs a lot of manpower. Oh and supply. Same for artillery. They had some successes with this but when they got a bit too aggressive the French intervened to help Chad. It was their largest overseas deployment to a combat zone since Algeria. Their mix of high quality recon and aviation was critical in helping Chad stabilize. Ultimately, the Chadian government would make overtures to reconcile and offer amnesty to rebel factions which had a huge portion come back into the fold. This meant the Libyans had a force meant to be augmented by local infantry...that lost its local infantry. This also meant local recon and knowledge was lost too. Lack of infantry, recon elements, and local support...that's like the unholy trinity of getting ambushed by guerillas and small raiding elements. I wonder why it became known as the Toyota War...
This isn't to say that the criticisms of how the military fought and was structured aren't true. Highly trained and well equipped forces have managed against what look like overwhelming odds on paper. It's hard to say just how bad the Libyans were at fighting because most of the fights weren't really a fair reflection. Two of those wars were "we are massively outnumbered and don't have enough of a fires advantage to offset that." The other had foreign intervention to counter their foreign intervention and then getting outmaneuvered politically which lost them the critical component of their structure. You can be the best tankers and artillerymen in the world (they weren't) but if the infantry abandon you...well you're fucked.