I have now fixed this on my other game FEMTALITY X https://aerisetta.itch.io/femtality-x-heros-end
It's a different game though unfortunately.
The fix requires a whole engine overhaul, im not sure i will have time to do it for FEMTALITY anytime soon since the game is very big and will an engine change will take a long time.