I encountered this bug as well and was able to fix it by applying this commit from the alpha branch of spacefm as a patch file in the debian source version of spacefm
https://github.com/IgnorantGuru/spacefm/commit/29219e1b09949683dcfe1d41bdf7d4f54687a95d it appears that this fix was never released in a stable version of spacefm, but it fixes the behaviour for me.

