After some investigation with Renata Popescu (Power BI Support Engineer) and Ludovic Fry (Incident Manager) from Microsoft, it was suggested to remove OmitValues = ODataOmitValues.Nulls from the query. This fixed it.
It appears that the sample query assumes there are only non-null values, and will therefore omit null values. Removing this part of the query ensures that null values are considered valid, and therefore removes the error.