The Idea Factory - The Stars of June
Sci-fi middle grade book. The book starts out on a starship, though they only call it a ship at first, making it unclear. The main character June is dancing around the mess in her sister's hand me downs. She has her own clothes, tucked away in a drawer somewhere, but always insisted on wearing the dresses that her sister got to wear. Everyone refers to her as June and in the female.
But then one of her parents gets hurt and they have to go to a space station for medical help. Her parents insist that she use her legal name, Justin while they're in port, and to stay with her sister. There's talk about the station being run by a fascist regime, though June doesn't know what fascist means. They're both home schooled on the ship, with them trying to keep off the radar, but her parents haven't been able to explain fascism to her to a degree that she would understand.
As they're leaving the station, the group gets stopped, and it becomes clear that the family is on the run from the law. They escape the station, but their ship is tagged and they need to work together to find a place where they can hide out. It may or may not turn out that part of the reason why they're on the run (though not the whole reason, I hope) is because June is trans and there are laws against it.