It seems you have two versions, both the normal binary and the flatpak. You can delete the apt package for swi-prolog. Next, you can add a script, alias or bash function to run the flatpak from the commandline using this command. This is the same as running swipl-win, i.e., it shows a Prolog console.
flatpak run org.swi_prolog.swipl [arg ...]
Alternatively, use this to run the commandline version in the calling terminal.
flatpak run --command=swipl org.swi_prolog.swipl [arg ...]
Note that the flatpak version is more limited. For most it should be fine though.
One is that the JPL and ODBC packages are lacking. I suspect there are also issues with adding extensions that involve foreign components, but I did not investigate that. Roughly, a flatpak executable runs in a container that provides its own libraries and executables and has restricted access to the host system. I’m not a flatpak expert though …