I cut my own hair twice. Both times it was because I had this sense of dysphoria, though it was not at all related to gender, and I literally could not resist the urge to cut my hair.
It's an unfortunate response that I tend to have to extreme, prolonged, nerve-wracking depression/stress if my hair is any longer than my chin.
TBH, I think it is because that super-stressed-the-walls-are-closing-in-slowly feeling reminds me of being a kid/teen. As a kid/teen, I had really long hair. So I think cutting my hair short gives me a sense of control over my identity.
That or I cut my hair because it gives me something to think about other than how stressed I am, even if I am simply trading one stressor for another.