If the original source is from SharePoint 2013 or 2016, the customized codes may be affected.
Due to you use ShareGate, it is a third-party tool which is not supported in the Q&A formula, I suggest you contact with ShareGate to get help.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.