Karla Sofia Gascón’s director didn’t want to ask her to play a man again, but her personal story proved a turning point.