UObject as Blueprint variable with details panel

I’m running in the same issue with a custom C++ class inherited from UObject: if I add it as a UPROPERTY to a custom C++ class inheriting from UActor, then it shows up in the property editor as expected (your second screenshot), but if I add it as a variable in a custom Blueprint class, then it shows up as in the second screenshot (like asking to pick an asset). I suspect it’s a bug in the UE4 editor. Here my C++ code:

UCLASS(Blueprintable, DefaultToInstanced, collapsecategories, hidecategories = Object, editinlinenew, abstract)
class XXX_API UBaseFoo : public UObject {}

UCLASS()
class XXX_API UChildFoo : public UBaseFoo {}

// ... in the custom AActor
UPROPERTY(BlueprintReadWrite, EditAnywhere)
UBaseFoo* YourChangeableObject;