After "Escape from Cidhna Mine" the guards get stuck in the prison loop. They keep confronting you about paying for your crimes and going to the mine. You can't pick the option of going to prison anymore since you already completed the mission, therefore the game loops back. Sometimes they don't even confront you and simply keep attacking you.