You’re right, there was no specific criminal offence. There was a long history of cross-dressing performers such as pantomime dames, eg.
Dan Leno, or female performers in boy roles such as
Vesta Tilley, so a blanket ban would not work. Instead, it was regulated as a breach of the peace, or offence against public morals and common decency. These deliberately vague offences allow for great discretion in enforcement, and resultant injustice. They were/are however minor offences. The usual punishment is a fine or to bound over for a period of time, which means you have to pay a fine if you do something illegal again.
Gender non-conforming women/lesbians of higher social station such as
Anne Lister, the
Ladies of Llangollen or
Radclyffe Hall were basically left alone.
Men in dresses had a greater chance of arrest, depending upon the situation. They were also liable to more serious charges. The classic example is the very famous
Boulton and Park case in 1870. They came from affluent families and were gay. They cross-dressed as performers, which was OK. They also however did so off-stage, and in public. This was much more risky. When they were arrested, however, they were charged with very serious offences which would lead to imprisonment: committing buggery and conspiracy to commit it. They turned up to court in drag, but were acquitted of the serious charges because the evidence was all over the place. This included risible medical evidence that they had large penises and scrotums, and those were proof of sodomy. They got bound over for the public decency offence, and went on their merry way.