F.dropout will randomly sample the mask in each call using the internal pseudo random number generator. If you seed the code, you would thus get the same random numbers and the result would be equal for different runs of the script.