Yea that function has a lock on it then, you can see in unreal doc pages what functions are locked and cannot be used in cpp, you can use only in blue prints.
So they did this to limit access to flawed output maybe and left it for blue prints with a conversion library. Could be that, anyway you can’t access restricted functions and classes from C++ in unreal if they are locked.
Your only solution is to convert to an int.