Question, is the issue I am seeing on the screen due to the black wireframes like looks on your project image that should not look like that from RDP?
If that is the case, its possible that its not RDP’s doing but the GPU-accelerated effects that you could be using in your composition.
Try doing this to fix this issue, you can try disabling GPU performance in After Effects by going to Edit > Preferences > Performance > Preview > renderer -> Software Only.
Hope it works for you. It could be the settings on AE’s GPU performance that could be triggering it but since you said Teamviewer works fine from there, perhaps it could be fact that Teamview is optimized for file sharing and remote desktop unlike RDP not getting along with After Effects.