I have the impression from playing classes like Hero and Phantom from the original game that perfect dodges don't fully grant you invincibility. You get the initial dodge frames and then there is a very small window of overlap where your invincibility frames end but the enemies still have their attack windows open so you can still eat hits even after a "perfect" dodge (Phaleg being the example from Phantasy Star Online 2). Classes like the Phantom did not get these extended windows at all so a perfect dodge only means your next attack is empowered.
The solution I have come to in the original game was to learn to "extend" your invincibility frames by retaliating with a counter-attack even if it whiffs immediately following your perfect dodge. In the case of the Gunner, you may want to use Stylish Onslaught for the immediate guard frames in the case things go wrong (as in you're anticipating taking a hit) or use your dodge-counter.
I don't know if this is exactly a bug since this is repeatable like it was with the original game but I do feel like it should be adjusted considering the workarounds are not as intuitive as other games where counter-attacks and evasion windows when used correctly would have granted you some breathing space.
@HoDKenji The Hunter Arts Avenger is also a tricky one because you still get the damage bonus for a missed timing but the timing has to be "just right" in order to negate damage. I really wish the indicator between the missed timing and the perfect timing was more obvious because the sound cues (and visual cues in my experience) are the same for both only in one instance you don't take damage and the other you do. I really do hope that this can be adjusted but not in the way that the Hunter's older Charge Parry was (a window too big to fail with as opposed to a window too tight to be accurate with).