The Dictionary of National Biography entry was written in 2004, and shows how much things have changed in the last few years:
"Barry, James (c. 1799–1865), army medical officer and transvestite, was probably born Margaret, … her paternity is in doubt. From the age of ten she dressed and presented herself as a man, " … "Barry's origins and motives remain a mystery, but she was a passionate reformer and pioneer whose achievements in medicine have been obscured by her lifelong masquerade. ...."
Edinburgh University's 2018 information about Barry avoids pronouns altogether but describes her as a woman who lived as a man, and first female graduate of the university.
www.ed.ac.uk/about/people/plaques/barry
Given that Barry wanted to be called he, to me it would be find to do the same. But it is ridiculous that this author is being so targeted for choosing she, given that it is impossible to know how she saw herself, and because current concepts of gender and identity can't just be overlaid onto past people.
I expect the truth lies somewhere between 'he was a trans man he he he he he" and "she was a woman who dressed as a man to make her way in a patriarchal world" - I expect its more complex than both of those positions. I'm sure the novel makes it more complex too.