I do not know if this is exactly that you want but I tell you how:
-select the HBoxContainer and in the inspector open the transform tab
-check the x and the y size
-attach an script to the HBoxContainer
-write the following code:
onready var first = $CharacterIconPreview1
onready var second = $CharacterIconPreview2
onready var third = $CharacterIconPreview3
onready var four = $CharacterIconPreview4
var requested_size = Vector2(5, 5) #Input here the values that you previously got.
Warning with the identations
I hope this will be useful for you!!