I make the test like you say, and it seem that the cast don’t work correctly.
You can see on the second picture that sometimes the cast work and sometimes failed.
Maybe the the object for the cast is wrong, but I don’t know with what I can replace it