Battle ended out of nowhere as a tie, no ties were offered, nor any criteria was (Seemingly) met for Endless Battle Clause to take place, this happened in Gen VIII BH, BTW.
This ends on turn 107, btw, it's important to clarify that for easing the replay check.
As Endless Battle Clause says:
- Any Pokémon affected by a foe’s Entrainment or Skill Swap becomes stale.
- If at any point after the first 100 turns of battle all Pokémon on the field are stale, at least one team does not have the option of switching to a non-stale Pokémon, and at least one side's Pokémon's staleness has been inflicted by a Pokémon of the opposing side, the game ends. If only one side started the battle with the rudimentary means to perform restorative berry-cycling (defined to be a team containing a Pokémon holding a restorative berry as defined above and a Pokémon with Recycle, Harvest, or Pickup), it loses. Otherwise, the battle ends in a tie.
So it is not bugged, that's how it's supossed to work