Thanks for the code snippet.
The model correctly reproduces the same results in eval mode using a static output:
model = nn.Sequential(
    nn.Linear(1024, 512),
    nn.ReLU(),
    nn.Dropout(0.5, inplace=True),
    nn.Linear(512, 2)
)

model.train(False)
for param in model.parameters():
    param.requires_grad = False
    
    
x = torch.randn(1, 1024)
out_reference = model(x)

for _ in range(100):
    out = model(x)
    print((out-out_reference).abs().max())

Are you using any other (random) operations?