That link [%SystemRoot%\System32\NOTEPAD.EXE %1], at least on my edition of Windows 11 (22H2, 22621.2361) takes me to the older version of Notepad which provides the message: "A new version of Notepad is available." with a Launch button next to it.
To add the "Edit" option to the right click menu for a .bat file, add this to the registry:
HKEY_CLASSES_ROOT\batfile\shell\edit\command
C:\Users\[NAME]\AppData\Local\Microsoft\WindowsApps\notepad.exe %1
Substitute the actual user name for [NAME]
Note that the key is batfile and not simply .bat...