The Aberdeen South MP said the two issues were “not related”, arguing that the prisons issue related to a “very small number of people”.
Transgender woman Isla Bryson, the 31-year-old who raped two women while identifying as a man, was sent to Cornton Vale women’s prison near Stirling in a placement that caused public uproar.
First Minister Nicola Sturgeon was later forced to come to Holyrood to state that no transgender prisoner with a history of violence against women would be placed in a female prison.
The backlash came only days after the UK Government used its veto to block the Gender Recognition Reform (Scotland) Bill.
The legislation, passed by Holyrood in December, would have removed the requirement for trans people to have a medical diagnosis before obtaining a certificate confirming their preferred gender.
Critics of the so-called GRR Bill, including Conservative MSP Russell Findlay, have looked to link the proposed changes to Bryson’s case.
Mr Findlay claimed on Tuesday that prisons had been treated as a “form of testing ground for gender self-ID”.
But Mr Flynn denied that the headlines around Bryson’s imprisonment had damaged the Scottish Government’s argument for gender identification reforms, saying the two matters were in “no way related”.
He said the UK Government’s statement of reasons, the policy rationale outlining why Conservative ministers blocked the Bill from gaining royal assent earlier this month, “does not at any point mention prisons”.
Mr Flynn said: “The two, from my perspective, are not related in any way, shape, or form.
“What’s happened in relation to those cases in Scotland is completely detached from the GRR Bill, which is a positive piece of legislation to try and improve the life experiences of a small but important group of people in Scotland.”
Mr Flynn backed the First Minister’s intervention after a “significant amount of public concern” was expressed following the convictions of Bryson and Tiffany Scott, who stalked a 13-year-old girl before transitioning, having formerly been known as Andrew Burns.
Scott reportedly requested a transfer to a women’s prison.
“I think we need to look at the context of this,” Mr Flynn continued.
“As I understand it, there’s about 12 trans people within Scotland’s prison service at this moment in time.
“So we’re talking about a very, very small number of people.
“There’s been understandable concerns raised about the two individuals over the course of the last week or so.
“The Scottish Prison Service obviously has a process to follow in terms of where people are housed, depending upon the risk assessment in place.
“The First Minister of Scotland has made a fair commitment in terms of a process and how that process is going to be moving forward. I think that was necessary.
“There’s obviously been a significant amount of public concern in and around these cases, and I think it is right that the Scottish Government acted.
“But I would just reiterate the fact that the GRR Bill is in no way related to those cases.
“And that’s not just me saying that, that’s the UK Government — they don’t even refer to prisons as part of their statement of reasons as to why they opposed the GRR Bill.”