An imprisoned person may or may not be enslaved as part of that imprisonment. If they get paid a reasonable wage, they're a prisoner with a job. If they're not forced to work, they're a prisoner but not a slave.
Slavery was a condition, usually a legal status, where someone's autonomy was stripped from them.
The work component only existed because why else would one want a slave?
If someone born into slavery died before they could walk, they still were a slave. If an old slave was allowed to retire without working again, that didn't stop them from being a slave.
An imprisoned person may or may not be enslaved as part of that imprisonment. If they get paid a reasonable wage, they're a prisoner with a job. If they're not forced to work, they're a prisoner but not a slave.