No, many families give male names to girls. They usually change it to a feminine form of the father or grandfather’s name or put a pleasant sounding middle name after it like Georgetta, Johnnie Mae, or Clydene. I can see them naming her Stanley Ann. However, shortening it to just Stanley is something I, personally, wouldn’t do. But that’s just me. If she was so out there that she’d get pregnant by a married black man back in the days when it was taboo, then she probably relished the idea of going against the rules and using a boy’s name. IMO, Stanley fit her perfectly.
We study naming patterns in the process called “Name Cleansing,” which tries to get each name correctly spelled, and assign a gender. The general rule of thumb is that male names (e.g., Hillary) can get adopted at a later date by females. There are few examples of female names being adopted by males at a later date.