I think that referring to a non-specific indefinite person like everyone, anyone, someone etc. as "they" is grammatical and widely accepted as being natural at least in informal speech. For example, the sentence "Everyone did their best" is grammatical. However, what about referring to a specific definite person?
Let's consider the following conversation.
"My friend just got back from the shop."
"What did they get?"
"They bought furniture for their new apartment."
"Are they married?"
"Yes, they are."
Are these grammatical?
Here's another example. A quote from the novel "A Study in Scarlet" written by Arthur Conan Doyle in 1886.
"What do you think of that?" cried the detective, with the air of a showman exhibiting his show.
"This was overlooked because it was in the darkest corner of the room, and no one thought of
looking there. The murderer has written it with his or her own blood.
Let's replace "his or her" by "their". Is the sentence "The murderer has written it with their own blood." grammatical in present-day English?