How to create pass-by-ref parameter with default value (something like “nullptr”) in Unreal's BlueprintCallable UFUNCTION?

That’s definitely interesting. Idiomatic C++ would be that an optional out value should be a pointer and not a reference.

But creating unique functions for C++ and Blueprint is a common enough pattern to solve other issues with the limitations of Blueprint. Fun Fact: you can make that blueprint specific function protected or private to prevent C++ users from having (somewhat) confusing duplication in the auto-complete UI. This is more useful when the Blueprint API is just worst C++ (like taking parameters by copy when C++ they’d always be by reference).