This is really more of a philosophical question than an historical one. Current U.S. military doctrine on this speaks of a six-phase continuum of combat operations. From a Marine Corps document on the question (which is a summary of general U.S. military doctrine) these are:
- Phase 0: Shape the Environment. This phase involves those joint,
interagency and multinational activities conducted on an ongoing,
routine basis to assure or solidify friendly relationships and alliances
and/or deter potential adversaries.
- Phase 1: Deter the Enemy. This phase focuses on deterring specific
opponents by demonstrating the capability and resolve to apply force
in pursuit of U.S. interests. These actions will likely build upon Phase
0 activities and may include a show of force or initiatives that would
facilitate deployment, employment, and sustainment of additional
forces within the region.
- Phase 2: Seize the Initiative. Hostilities commence during this phase.
Combat power is applied to delay, impede, halt, or dislodge the
adversary as well as to gain access to theater infrastructure and
enhance friendly freedom of action. Concurrently, assistance is
provided to relieve conditions that precipitated the crisis in order to
promote stability.
- Phase 3: Dominate the Enemy. The focus during this phase is on the
exploitation, pursuit, and destruction of the enemy in order to break
the opponent’s will for organized resistance. Stability operations will
also be conducted as needed to facilitate transition to the next phase.
- Phase 4: Stabilize the Environment. The priority during this phase
will be on stability operations, the reconstitution of infrastructure, and
the restoration of services. This phase concludes with the transfer of
regional authority to a legitimate civil entity.
- Phase 5: Enable Civil Authority. Legitimate civil authorities are
enabled in their efforts to provide essential services to the populace.
These activities include required coordination activities by U.S.
military forces with multinational, interagency, and non-governmental
organizations while promoting a favorable attitude among the
populace toward U.S. and host nation objectives.
As you can tell, some of this is and is not coherent in a pre-20th/21st century context, but where your question becomes confusing is between and during phases III and IV. It is entirely possible that in phase III you will destroy the enemy as originally constituted, only to face a Phase IV that is difficult to distinguish from the initial state of war.
Using this concept it's entirely possible to speak, for example, of the Union winning Phase III of the American Civil War in 1865, but Phase IV continuing until 1964: https://foreignpolicy.com/2014/07/02/u-s-civil-war-ended-50-years-ago-today/
edit: wrong link.