You should reference UObjects as pointers and not as reference.
UObject* MyObject
Since UObjects are garbage collected by the engine, it would destroy the object and set these pointers automatically to null when they are no longer referenced, hence the need for a pointer enforcement