The first article you linked, from Fair Play For Women, cites a BBC article dated after the article, that calls their organization out for questionable interpretation of the data. While they have one number that is roughly half of another, what BBC has to say is,
[...] those 125 transgender inmates only include people who have had a prison case conference. It won't include transgender people who haven't identified themselves to the prison service or who already have a gender recognition certificate.
In other words, if a trans person did not declare themselves trans at an occasion that may not necessarily arise, they weren't counted. Nor were the handful of trans offenders that had their legal gender changed.
The BBC Article cites a Ministry of Justice report that states
The figures give an estimate of the number of transgender prisoners and are likely to underestimate the true number. There may be some transgender prisoners who have not declared that they are transgender or had a local transgender case board, and some who have a Gender Recognition Certificate
And the 125 figure is "prisoners currently living in, or presenting in, a gender different to their sex assigned at birth and who have had a local transgender case board." Notably, the Fair Play For Women article seems to assume all these prisoners are trans women, but the report says
Of these, 99 reported their gender as male, 23 reported their gender as female and 3 did not state their gender.
So the further implication that these are actually men trying to get into womens' prison is also false.
The 2018-2019 annual report (cited by the medium article) from the Chief Inspector of Prisons for England and Wales surveyed prisoners for various things. This included gender identity, and out of the approximately six thousand surveys, approximately 2% of the responders identified as transgender, which is approximately the same as population at large. There's also a highlighted case of two transgender prisoners not known to the prison administration. It could be that the survey managed to catch the entire trans prison population, but that is unlikely. Therefore, the real figure for the number of transgender prisoners would be more than ten times the FPFW figure.
And, on the subject of comparing prison- and general population, the 2021 census found 0.5% of England and Wales's population reported being trans (on a per-household form which may have skewed the statistics). This report on the UK prison population puts the total population at approximately 80000, which would make the 125 figure around 0.15% of the prison population, quite an underrepresentation.