So, the good news: I have a passport again. I can leave the country.
The bad news: They put an incorrect gender marker on it.
The name, photo, and gender marker on my passport no longer match each other. The gender marker on my passport no longer matches my legal gender, nor does it match the gender marker on all of my other identification.
Travel will unavoidably be less safe for me now, even in countries with relatively good track records re: the treatment of trans people.