You can set a default editor like so, in the system terminal:
flatpak permission-set desktop-used-apps text/markdown net.cozic.joplin_desktop org.gnome.gedit 0 3
You could repace text/markdown with e.g image/jpeg, and replace org.gnome.gedit with e.g org.vim.Vim (based again on desktop file names at a guess). The 0 3 bit, if I I remember correctly, is how many times it's currently asked and how many times it will keep asking until it stops showing the prompt entirely.
But you could do for example
flatpak permission-set --data "{'always-ask':<true>}" desktop-used-apps text/markdown net.cozic.joplin_desktop org.gnome.gedit 0 3
Importantly, the always-ask=true bit forces the prompt to always pop up when trying to open the mimetype. I'm under the impression the rest is still relevant so things don't break, even though it looks like it's still asking for gedit in the example above.
And finally you could always rm $HOME/.local/share/flatpak/db/desktop-used-apps to reset the entire learnt preferences database entirely, but I assume the flatpak permissions command has a nicer way to achieve it.
Generally, these same principles apply to snap, and the flatpak permissions command can actually set these preferences for snap too.