Shooting your last round of ammunition causes the attack animation to cancel
Running out of ammunition is supposed to not let you initiate a ranged attack or be able to release the attack if you're currently preparing it. However, you run out of ammunition right when you release the attack, so the attack animation abruptly stops when you try and shoot the last round.
The expected behavior is to let the player finish the attack animation that uses up the last round of ammunition and only cancel the attack if that last round of ammunition was removed from the inventory before or during aiming.