Simply put: removing the shortcut and adding the mapped one to the list moves it to the end of the list. To preserve the original order, either remove/add all of them, regardless of they're mapped or not, or add a platform API to replace existing shortcuts keeping their position. Looks easy enough, I think I can do it myself easily, but of course it'll only make it to 2024.1 then.
See this platform issue:
https://youtrack.jetbrains.com/issue/IDEA-339740
Simply put: removing the shortcut and adding the mapped one to the list moves it to the end of the list. To preserve the original order, either remove/add all of them, regardless of they're mapped or not, or add a platform API to replace existing shortcuts keeping their position. Looks easy enough, I think I can do it myself easily, but of course it'll only make it to 2024.1 then.