Hello PleaseBeKindToMe,
Thank you for your question and for reaching out with your question today.
When upgrading to Windows 11, only recognised registry entries will be retained and any unrecognised modifications will be lost. Hence why your registry modification was not retained through the upgrade process. There is no way to retain these changes through the upgrade process and they will need to be redone after the upgrade is complete.
If the reply was helpful, please don’t forget to upvote or accept as answer.