UE5 Cast fails only on mobile

As the title says, casting doesn’t work only on mobile for some reason. I am using unreal engine 5 and the casting works fine on desktop, but for some reason it doesn’t work when simulating mobile.