- Edited
I started the card scene all over again and I managed to make it work.
I changed multiple things and I am now using the button $Button.toggle_mode = true
and $Button.button_pressed
to know the state of the button.
I also changed mouse.filter
parameter on some nodes.
I'm not sure what was causing the issue in the first place, but it was somehow related to the card scene.
Thanks for taking the time to help.