Using .cpp and .h files in UE5

I use UCLASS(BlueprintType) and it works, maybe you can try it.