According to the documentation at https://support.google.com/merchants/answer/6324448?hl=en, the value you set for availability should be 'in_stock'. You have a space in your provided value. Please change the call to the below and try again:
$product->setAvailability('in_stock');