that happened to me too.
I'm new to the game, and i just thought that was due to the random chance of hitting the enemy based on distance.
But if the attack system just divides the damage based on the distance (eg. Xdamage*0.15 instead of 15% chance of Xdamage) then there's definitively a bug somewhere.
I was playing a test match between my AIs and a 1v1 between the shotguns happened during the match.
They had the same subroutine for 1v1 vs shotgun: as long as there are no other enemies midrange or attacking me out of range, and the opponent has equal or lower healt+shield >> attack at middle or short range and never retreat.
They both pick the fight because they are full health and shield, they start shooting at the same time, so they should have died at the same time as it always happened in 1v1 simulations.
But suddenly, halfway through the fight one of them start retreating because it's shield is lower than the opponent's one.
i kept reviewing the frames and actually one of the bullet hit harder than the other (or the other just missed) resulting in unbalanced health+shield stats.