Changing the genders works most of the time, but not always.
One example, “The Girl From Ipanema,” which is often covered by female singers as “The Boy From Ipanema.” Except it doesn’t really work when it gets to the part about how the boy walks “like a samba” and “swings” and “sways” etc. It sounds more like how a man would talk about a woman walking - I’ve never heard of a woman caring much about a man’s walk. Not that it never could happen, but it just sounds weird.
The Astrid Gilberto version had it right. She still sang about a girl, but at the end, referred to a man who wanted her, described in the 3rd person. It changed “She looks straight ahead not at me,” to “She looks straight ahead not at he.” Not quite grammatically correct, but I think a bit of poetic license is okay here, and makes the most sense.