GridContainer is not displaying only when I build the game

Godot Version

v4.2.2.stable.official

Question

I have a Sudoku project made in Godot, but the main grid, which consists of buttons inside a GridContainer, is not showing up when I export the game. Can anyone help me figure out why this is happening?

Debug:

Build:

This is the code that initialize the grid when the game starts:
func initialize_grid():
for cell_count in range(9*9):
var cell = Cell.instantiate()
cell.main = self
$Cells.add_child(cell)
cells.append(cell)
cell.cell_updated.connect(_on_cell_updated)