But in prisons you spend way more time isolated. There is less freedom of travel, and I'd assume they'd be less physical contact (although maybe more if you considered shared showers).
I am communicating daily with a prison inmate and they are required to wear masks all the time. But yes, that won't help due to all the other aspects of prison.