I try never to lie, especially to people I'll have some sort of friendship with.
It's not a lie to allow someone to believe you're cisgender, any more than it's a lie to allow someone to believe that you haven't had appendicitis, cancer, a broken bone, etc., simply because you haven't given them your whole history.
We don't owe people an accounting of our history. We just don't.
However, I do often mask the gender of people I associated with. Never my "ex-wife". Always my "ex". I didn't go to boy scout camp. I went to scout camp. The person in charge there was the scout leader, not the scoutmaster, etc. I never pronoun my college roommate, etc.
I have no trouble leaving out vital information that people have no god given right to have.
But I try not to lie.