At the end where the else was, my thing was just doing visible = false as soon as input was pressed and didnt wait for other animation to finish, but i did my research and found that yield can fix it
This is my final code, it now works perfectly ;)
extends Button
func _ready():
visible = false
func _physics_process(delta):
if Input.is_action_just_pressed("ui_cancel"):
if not visible:
visible = true
$FadeIn.play("FadeIn")
else:
$FadeOut.play("FadeOut")
yield($FadeOut, "animation_finished")
visible = false