I definitely think of my AI opponents more in terms of the leader, at least since Civ IV. It's not the Mongols or Celts I want to avoid as a belligerent neighbor, it's Genghis Khan or Boudica. I'm not competing against Korea for scientific advancement so much as I'm competing with Seondeok. The U.S. as an opponent is less salient than Teddy Roosevelt, its Civ VI leader. And if I get annoyed at my AI opponent, I curse out the leader, not the civ.
But I also think of my own civ in terms of the leader. I think part of it is because I played Civ IV the most, and was able to decouple leaders from civs. I looked for leaders with certain traits (e.g. spiritual, creative, industrious), and then picked civs with an interesting unit or custom building I wanted to try. (I used Catherine a lot, but didn't want to play as Russia, so I shopped her around. Same with Hatshepsut.) So I've gotten used to thinking of the game that way. When I picked up Civ VI and VII, I remained aware of the leader I was using, and usually picked leaders whom I found interesting, moreso than civs.