This doesn’t happen to float or any other type that isn’t an ObjectReference type (eg material, skeletal mesh, etc). To repro this in a new project:
- Create a material
- Create a function library
- Add a function to the library
- Add a local variable to the function in the library
- Change the type of the local variable to a material
- Select the material you created in step 1 as the variable’s default value
- Compile
Some screenshots from before and after I compiled the function: