In your case it worked cause all associated “console unique keys” were transferred to the new console.
So your save was “locked” via the old key, then the old key was handed over and being used by your new device.
Still I’m glad you got it working
Left this comment on the youtube video but might as well put it here as well. In regards to the part where you edited the code to check the ROM header ID (i.e AXVE) wouldn't it have been easier to remove the region indicator from it? across all regional copies of Ruby and Sapphire the only thing different is the region indicator. So E for US copies, J for Japanese copies, I for Italian, you get the idea. So instead of changing the header detection to look for "A" but instead had it check for "AXV" for ruby and "AXP" for sapphire, then both games would still be detected as their respective versions with their appropriate languages.
Just a little suggestion in case you ever decide to update the compatibility code in the future!