I was struggler to flip my kinematic body, but i found to manage to be able to doing it the rigth way with all the answers i read.

onready var animated_sprite = $AnimatedSprite
onready var melee_weapon = $Hitbox
if velocity.x > 0:
melee_weapon.scale.x = 1
animated_sprite.flip_h = false
elif velocity.x < 0:
melee_weapon.scale.x = -1
animated_sprite.flip_h = true
and that work for me.
If i understand, moveandslide() reset each frame scale.x to 1. Im not sure but i seem to read somewhere this reason for the flickering.
My first answer, yeah :D