This page of the Ratchet & Clank Rift Apart game guide describes a potential bug, a symptom of which may be an endless battle. In exceptional cases, this error may prevent you from continuing, especially if defeating all enemies is required to complete the current mission objective.
The problem / bug with completing battles can occur primarily in locations with lava. These might include the battle arena at the Gastropub or the surface of the planet Blizar Prime.
If a particular battle doesn't end, walk around the edges of the arena. A very plausible scenario is that some enemies may have jammed while trying to jump out of the lava and into the actual arena. You should still be able to fire at these enemies and bring the fighting to an end. This will also save you from having to restart the checkpoint and the entire battle (this can be done from the pause menu).