Of course, the outputs are not the same because I didn’t control the random state here.
But the 2 models are the same in theory.

According to the nn.RNN documentation
dropout – If non-zero, introduces a Dropout layer on the outputs of each RNN layer except the last layer, with dropout probability equal to dropout. Default: 0