Fatal miscalculation by central government in assuming there is a single soul in Scotland who hates trans people more than they hate the English.
The UK is formed of 4 countries: England, Scotland, Wales and Northern Ireland. The latter 3 are not 100% willing in this union, to put it politely, and all have good historical reasons to be resentful and want independence. To stave off any huge protests, the compromise is these countries have devolved governments who pass laws for their countries, with central government located in England ("Westminster").
There is a veto option for the devolved governments. If Westminster doesn't like something the devolved governments are doing, they can refuse to submit it for royal assent (rubber stamping by the monarch, because this country is fucking stupid). This doesn't happen in practice, because the devolved governments are the compromise, the gesture from Westminster to stop them actually trying to leave the union.
In the entire history of the devolved Scottish government, central government have not vetoed any law. Central government knows vetoing would ignite calls for independence, and people taking action for it. This would happen regardless of the issue, even something as banal as road signage. So they don't veto... until now, because Rishi Sunak apparently doesn't understand why the veto is never used and has picked this stupid hill to die on.
In this context, what I suspect will happen is the entire "trans debate" gets put aside and subsumed into a culture war as to whether or not Westminster needs to wind its fucking neck in, because it really would have been just as inflammatory had Westminster chosen a duller fight to pick, like something about what information goes on food labels