The issue @riticmaster908 and @Deadpool198 are experiencing is not actually wins being mis-recorded.
It is because when they try their code against the opponents for the “Loss” entries, they are always playing as Red.
Right now there is a bug in Giant’s Gate, where Blue’s fireballs do no damage to Red’s units.
So if your code uses Fireballs, if you are simulated as Blue you will probably lose. Those are the Losses that are showing up I believe.