First thing: AE uses 23.976 (correct), not 23.98 (incorrect).FCP says it’s 23.98, but FCP and AE both work in 23.976, which is 4/5 of 29.97.
Beyond that, we need to know some specifics.Specifically, the frame rate of your imported footage, your compositions, and your rendered footage.
Also, exactly how are things messing up? How are you viewing the messed up file? In which app? Alone, or imported into FCP? What is the codec of the FCP sequcne, what is the codec of the AE rendered footage?
Under what conditions does the timing look correct, and when does it look incorrect? What are the difference between the two situations in terms of apps, footage?
Also, what is your process? Your workflow between FCP and AE?