Just chiming in with my own experience. I had the exact issue described in OP, on 5.6, for a struct I was trying to define in the project’s primary module.
The fix for me also involved loading phase. For obvious reasons I didn’t want to change the loading phase of the primary module, so my fix was to add a new plugin for it.
Specific steps for those less familiar:
- Create a new Plugin (named something like CoreDataTypes)
- Add it to the primary module build.cs, in PublicDependencyModuleNames
- Set the new plugin LoadingPhase to PreLoadingScreen (in CoreDataTypes.uplugin)
- Move the struct header file into the plugin’s public source folder