Not sure about iOS Firefox, but on Android you can disable that altogether. Turn off "open links in apps".