They identify you are going for the same victory as them way before that.
The real trigger probably is if you have a tech like Writing
It makes sense as having built the Apollo program is the only REAL indicator someone is going for a space victory as just teching fast is needed for any game really. However it is not the trigger for the AI.
I'm pretty sure if an AI randomed to go for a science victory in their game, they will always dislike you of pursuing the same victory as long as you are not weak (lets say at least top3 civ) and they start to dislike you for other reasons.