This came from our team:
In short: the data is OK, its just QGIS being QGIS.
In more detail:
This isn’t a bug but it does behave somewhat counter-intuitively so there is potential for improvement.
Basically outside the bounding polygon it still runs the evalscript but takes the band values as zero.
in this case:
SAVI:
let val = 1.5* ((samples[0].B08-samples[0].B04)/(samples[0].B08+samples[0].B04+0.5));
NDVI:
let val = (samples[0].B08 - samples[0].B04)/ (samples[0].B08 + samples[0].B04);
NDVI will divide by zero returning NaN, SAVI will return 0.
The masks themselves are correct and identical for both (note that float masks alpha range is 0-1 which isn’t qgis friendly which expects 0-255).
Ideally the values would be NaN for pixels outside the bounding polygon (where their alpha value is 0).
We will take this into consideration with the next version of the API.
Thanks for pointing it out.