scientists cannot know how an ancient individual identified themselves.
Well then, we can identify them any way we want, and their ghosts can haunt us if we were wrong
Without identifying the objective sex of a find, it is impossible to have any guesses about how the individual might have identified themselves. For example if you find a female skeleton buried with spears, other weapons, and what might be forms of body armor, you might guess that she identified herself as a warrior or hunter. If you find a male skeleton buried with herbs and fine cutting tools, you might guess that he identified himself as a healer, which in some cultures might be a feminine orientation.