How to ignore NaN in masks

Hi to all,
I am trying to export only a part of the sentinel-1 data using a band math.
When I do a mask unfortunately, it takes also into account the NaN part of the image…
How can I remove them ?

you cannot entirely exclude the red areas from the export, because every raster is a square geometry in the first place. But you can define a nodata value in the band properties to make these pixels transparent. A nodata value is then given in the exported raster which makes it “invisible”