Gene Roddenberry specifically changed the ST:TNG opening monologue to say “its ongoing mission”, changing the original female reference (see writer’s guide). Every episode opened with this gender-neutral reference.
However on the official Startrek.com owned by CBS the Enterprise has female pronouns.
Also, in ST:The Battle Data reviews the logs from the Stargazer which is referred to as a female:
DATA: The last entry dated nine years ago, sir. By you. (reading screen) We are forced to abandon our starship. May she find her way without us. Apparently she did, sir.
CRUSHER: How do you feel, Captain?
PICARD: Oh, I'm fine, Doctor. Lieutenant Yar, run a structural analysis on the Stargazer for an impulse tow. Data, download all computers to the Enterprise and file. I'm going to look at my old cabin.
What is the official canon and how does Discovery treat this?