It’s hard to see exactly what the differences are without seeing ‘everything’.
Check

ensure image pre-processing is exactly the same (aside from color channel transpose)
ensure batch sizes are the same
ensure test/val splits are the same
ensure model mode is being switched between train() and evail() and back otherwise dropout remains active during eval
ensure any learning rate schedules are the same