The only way for that line of code to execute is during a TBS battle or do you mean after victory is confirmed it bugs out on the same map?
Yes thats correct
You may try this update: v1.5.7 - Some adjustments - RPG Maker MV/MZ: Tactical Battle System by Synrec (itch.io)