We faced an issue in the kaggle notebook because the resampling was not working properly. The cause of this malfunction was the presence of the function EnsureChannelFirstd after Spacind and not before.
The function EnsureChannelFirstd should always be called right after LoadImaged.