Abort battle without flee animation

My current game uses SV battles. Without actually spoiling anything, I have a battle planned that ends partway through and then continues the cutscene. I looked extensively for a solution that forces the battle to end without the victory screen. The built-in "Abort Battle" event does do that, but it also shows the party fleeing, which does not make sense in the scenario. I'd like to know if there's a solution to force the battle to close, without the victory sequence or the fleeing sequence.
You can use this little plugin to skip the escape sound and animation in MV during the Abort Battle event command. Specify a game switch ID in the code below and turn the switch on to skip the escape effects:

JavaScript:
(() => {

    const id = 1; // if this switch # is enabled, skip the escape effect during Abort Battle

    const abort = BattleManager.checkAbort;
    BattleManager.checkAbort = function() {
        ($gameSwitches.value(id)) ? this.quickAbort() : abort.apply(this);
    }
    BattleManager.quickAbort = function() {
        if ($gameParty.isEmpty() || this.isAborting()) this.processAbort();
        return false;
    }
 
})();
You can use this little plugin to skip the escape sound and animation in MV during the Abort Battle event command. Specify a game switch ID in the code below and turn the switch on to skip the escape effects:

JavaScript:
(() => {

    const id = 1; // if this switch # is enabled, skip the escape effect during Abort Battle

    const abort = BattleManager.checkAbort;
    BattleManager.checkAbort = function() {
        ($gameSwitches.value(id)) ? this.quickAbort() : abort.apply(this);
    }
    BattleManager.quickAbort = function() {
        if ($gameParty.isEmpty() || this.isAborting()) this.processAbort();
        return false;
    }
 
})();
Worked perfectly, thank you!

Original thread: https://forums.rpgmakerweb.com/threads/abort-battle-without-flee-animation.156901/