FORM data writing to Glide but NOT to Google Sheet

The way I would write your arrayformula:

=ARRAYFORMULA(if(LEN(B2:B) = 0, ,randbetween(1,10)))

Regardless, we suggest deleting all the empty rows Google puts in your sheet by default.