I cannot reproduce the issue using resnet18 as seen here:
model = models.resnet18()
x = torch.randn(1, 3, 224, 224)
model_traced = torch.jit.trace(model, x)

out = model(torch.ones(1, 3, 224, 224))
out_traced = model(torch.ones(1, 3, 224, 224))
print((out - out_traced).abs().max())
> tensor(0., grad_fn=<MaxBackward1>)

In case you are using a different model, make sure the traced model uses the same “code path” as the eager model (e.g. in case data-dependent control flow is used inside the model or dropout etc.).
EDIT: the tracer should also raise a warning e.g. if dropout was used in training mode:
TracerWarning: Trace had nondeterministic nodes. Did you forget call .eval() on your model?