How to safely use template structs?

Garbage collection tracks UObjects as a chain of objects referencing other objects. If there is no such reference left (in your case, the UPROPERTY), then it is collected. The struct on its own is not proper use.