The US, Russia and China all took turns losing wars to Afghanistan and Vietnam but nobody lines up to buy weapons from them because strategic victory (denying the enemy their war objectives) due to a lack of political will in the opponent or superior geography isn't the same thing as tactical victory due to better weapons.
Afghanistan and Vietnam didn't beat their adversaries through advanced military technology, but by the shear capacity to absorb unholy amounts of damage and injury. Arguably Iran is in a similar position, though its Shahed drones and ballistic missiles did prove capable of reaching out and touching others within the theatre (1,000 -- 2,000 km range), and that these systems were resilient against attempts by its adversaries to destroy both stocks and launchers.
Ukraine is the odd one out in that it has developed significant technological capabilities, largely with drones and anti-drone defences, and has active buyers for that tech.