Module Cyclical Dependency Issue

I have two modules (let’s say module A and module B) that both need to interact with each other. Module A has a class that needs to call a member function of a class in module B, then the class in module B receives data from over the network and then passes the data back up to the class in module A by calling one of the class’ member functions.

The problem with this design is that module A is dependent on module B, and module B is dependent on A, leading to a cyclical dependency that UBT complains about (this is after adding the modules to the Build.cs files). I cannot use forward declarations because both modules need to call a member function of each other module’s class, which means the pointer to the class instance must be dereferenced. What is the recommended Unreal solution to this dependency?

I have the same situation/issue. Did you come up with a solution, or do you have any additional information about this?