We are migrating SharePoint 2013 to SPO. we are getting error while migrating the pages having custom page layout using Sharegate. With Sharegate layout mapping data is getting lost. So is there any way that we can migrate and retain the data of pages having custom layout? There are some pages where layout is linked to master pages as well.
As far as I understand, you just want to migrate the data. To lose the custom layout is acceptable.
The SharePoint Migration Tool reverts the custom layouts but migrates the content as statet here:
Customized files are out of the box SharePoint files that have been modified by a user. A common example is using a tool like SharePoint Designer to open a site and modify the default.aspx file of a site. During migration, these pages will be reverted to their uncustomized state.