Keeping aside the obvious unsupported nature of the Flatpak/Snap builds, they already by default show a list of applications to pick from. If that isn't the case on your system, they've either defaulted to picking the same option because they've remember it being picked before, or your system is misconfigured and lacks xdg-desktop-portal integration.

And because of the sandboxing, you'd never be able to the list of installed applications without weakening the sandbox to begin with. The security model in place means that while you can technically open applications, you can't query what they are in advance or know what was even picked when it happens.

(xdg-open on Snap/Flatpak is a wrapper to the xdg-desktop-portals functionality).

It's unfortunate for power users, but the vast majority don't seem to have a problem with it IMO. And the only option that makes sense for the Snap specifically is replacing the option to specify the path with an option that asks "do you want to be prompted which application to pick everytime (never remember)". Although Flatpak can technically use any arbitrary editor, in the ideal conditions, it'd be the same.