Before you follow the following steps… Copy your customized layout somewhere as a backup first
If you click the Reset to default button at the bottom of the custom page, it will insert the latest version automatically but it will also overwrite your custom code so hence backup your layout first. Once you know latest version you can replace it in your code.