I’m getting same error but I think only way would be to do it through FString. So get class as FString and serializes that instead. My custom data that need to be serialized are suffering from this as well. Will post answer once I figure it out.
There are heaps of different implementations of FArchive and it totally depends on your context. The following though may be want you want. It converts any objects (including classes) and FNames to FString, then passes that to the archive that it’s wrapping. It obviously only works on objects that have a fixed path, but in the case of classes that’s always the case.