To counter overfitting, try to add more regularization (dropout, weight decay), decrease the model capacity (smaller or less layers), add augmentation, and make sure the splits are valid (i.e. the data is equally “hard” in both datasets).