Currently --write-mask only supports plink1 format, which is incapable of storing non-integer dosages. Thus if there are non-integer dosages (either in the original input, e.g. for imputed variants; or due to applying non-integer weights) --write-mask will round them to the nearest integer. This is bad for accuracy and for reproducibility, since it throws away any information that those fractional parts may have contained; and since the actual analysis is done on the fractional values (not the rounded ones).
To address this issue, I propose adding a --write-mask-pgen flag [edit] adding a --mask-format option that can be set to "pgen" to write the unrounded pseudo-genotypes to plink2 format (.pgen, .pvar, .psam).