You can create another autocast function specifically for object references by declaring it as follows:
UFUNCTION(BlueprintPure, meta = (DisplayName = "Object Reference To UniversalParameter", CompactNodeTitle = "->", BlueprintAutocast), Category = "")
static FUniversalParameter Conv_ObjectRefToUniversalParameter(TWeakObjectPtr<UObject> objRef);
Here, the function takes in a TWeakObjectPtr which is a type of object reference that can handle the case where the referenced object is destroyed. This way, if you pass in a self reference or any other object reference node, the function will handle it correctly.
Note that you will need to implement the body of the function and define the FUniversalParameter structure to convert the object reference to the desired data type.
I didn’t try the code above, so let me know if you run into any issues.