Criminalising wrong-sex toilet use is hostile gimmickry and certainly not something that I would like to see in the UK. It is unworkable and doesn't even address the actual problem, as opposed to the imagined problem.
The actual problem, in the UK at least, is that service providers (such as shop owners, gym management, etc), are no longer confident that it is legal for them to provide single-sex facilities, or to enforce single-sex facilities by means of the usual methods (asking someone to leave, terminating their membership etc).
The issue has never been one of actively policing the admission of people into facilities which, (as TRAs are keen to point out ) would be oppressive and unworkable. It is simply about clarifying the responsibility and the leeway that facility providers have to keep on doing what they have always done.
As I recall, Liz Truss's private members bill went down the criminalisation route, and that was one of the ways in which it was pure grandstanding, aimed at fanning flames and virtue signalling rather than at protecting women.