If I am not mistaken, you need to get the pointer from the FindPropertyByName() and cast it as FStructProperty and then you will receive the correct answer at GetClass->GetFName()
I have checked some of my code library and found that from the property you will use (did with your code):
FProperty* property = Target->FindPropertyByName(Name);
FStructProperty* structProperty = Cast<FStructProperty>(property);
if (structProperty)
{
name = structProperty->Struct->GetClass()->GetFName();
return name;
}
Obs: the difference is the Struct pointer in the middle.
It is useful to look at some engine source to find this type of hint. Usually I look at the source where tools handle information found in blueprints and structs.
I have just changed your own code in my previous post. It will work. It is important to use certain functions with the correct pointer, so my suggestion is to keep using FStructProperty.