Putting aside whether the UK government's approach is a sensible one (which in my view it isn't) we should be aware that:
"the UNHCR, with financial support from the EU, has transferred refugees from Libya to Rwanda under a scheme called the Emergency Transit Mechanism (ETM) [..] The ETM offers vulnerable refugees, taken into detention by the Libyan authorities, a choice to have their application processed in Rwanda."[0]
"In 2019, the [Rwandan] Government established the Emergency Transit Mechanism (ETM) Centre that hosted 824 refugees evacuated from Libya. Currently, the transit centre hosts 371 evacuees while working on long-term solutions continues. By the end of 2021, 462 refugees had resettled to third countries so far."[1]
So Rwanda was apparently safe enough for the UNHCR to offer to process some refugees there.