Here’s how I always took it (it’s been a while though, so I may be remembering incorrectly).
After the prostitution bust, Hedwig finally gets her acclaim. People recognize her brilliance and Tommy’s utter poseur status. Like most rock stars, though, this doesn’t resolve her underlying unhappiness. This is what tore apart her band and drove her friend Yizchak away; this is what prevented her from moving on from her failed marriage.
While the sex change is close to the core of this unhappiness, it is probably not its ultimate cause. Hedwig finally addresses the cause when she takes off her drag. In the commentary, Mitchell talks about how many drag queens were shocked and insulted at his breaking drag when he was trying out the Hedwig character in nightclubs. This is the crucial scene of the movie, and starkly makes a distinction: Hedwig is not a transvestite, she is not a woman, but she is Hansel, a man.
As such, my guess is that the movie is a message on being a gay male and not a transvestite and not intersex. The drag and the operation (Hedwig) were distractions that allowed Hansel to avoid living as a gay male, by providing him a role as a “straight” female. It got him pretty far (albeit through a winding road): out of Communist East Germany, out of a trailer park in Missouri, and eventually into New York Rock Stardom. But life as Hedwig was untenable because Hansel, at the core, was urging to come out and live his life as a male. By coming out of drag, Hansel was allowed to reembrace his masculine half. Hedwig was not discarded, though – the tattoo was unified. This allowed Hansel finally to reach acceptance and to be at peace with himself.