If it’s a USTRUCT you UObjects should probably all be marked with UPROPERTY anyways.
What I was referring to was UPROPERTY used here
UPROPERTY()
TOptional<FVector> OptionalVector;
At least in 4.26 and earlier this is not supported. In 4.26 UnrealHeaderTool throws error : Unrecognized type 'TOptional' - type must be a UCLASS, USTRUCT or UENUM. If you really wanted to it should be possible to extend/modify the engine to support this directly. There does not seem to be any pull request on GitHub that already implements this.
For now instead just use TOptional<FVector> OptionalVector; without the UPROPERTY(). This works fine as long as the struct, such as FVector in my example, does not have any UObject* members. Because the engine does not support TOptional UProperties as described above, you should deal with any UObject* members in your struct regardless of whether they themselves are UPROPERTY() or not. Otherwise you’d rely on the UObject* being referenced somewhere else in order not to be garbage collected.
As an alternative to implementing AddReferencedObjects in the class holding the TOptional member you may also be able to use TWeakObjectPtr<UObject> instead of raw UObject* in your struct or derive the struct from FGCObject and implement AddReferencedObjects directly in the struct itself.