Can you make the cards a control type node? So you can set the size flag property on each card to SIZEEXPANDFILL. Or better, I would do it manually, it would be something like that, keep in mind that it is a quick code of tests you would have to adjust details but basically it is about dividing the width of the control (although it can be any node that has a width) to get the position :
extends Node2D
var scn=preload("res://SpriteScene.tscn")
var cardcount=5
func _ready():
pass
func add_hijo():
for i in range(cardcount):
var s=scn.instance()
var pos=$HBoxContainer.get_global_rect().size.x / cardcount * i
s.position.x= pos
s.position.y= $HBoxContainer.get_global_rect().position.y
$HBoxContainer.add_child(s)
func _input(event):
if event is InputEventMouseButton and event.is_pressed():
add_hijo()