The Vietnam War is an excellent example of how people confuse political goals with military objectives.
The politicians said: 'We need to defeat X country.'
The military said: 'In order to defeat X, we need to take this and that cities, blockade these ports, etc.'
In the Vietnam War, the US military achieved all of its military objectives. The US Air Force needed to gain absolute air supremacy and done it. The US Navy needed to control the sea off Viet Nam and done it. The US Army needed to control the ground wars and done it. After the disastrous 1968 Tet Offensive, the VC ceased to be an effective combat force. Before 1968, the VC can field battalion level strength, but after 1968, never more than squad and those squads were usually on the run.
The point from the Vietnam War is that despite all the successful military objectives, the politicians can throw those victories away. In a manner of speaking, the American politicians, pressured by internal dissatisfaction, did quite that -- threw those military victories away when they voted no funding for the war so the US had no choice but to leave the country.